docker-mailserver/docs/content/config/best-practices/dkim.md

34 lines
1.3 KiB
Markdown
Raw Normal View History

2016-04-24 17:20:18 +02:00
To enable DKIM signature, you must have created your mail accounts.
Once its done, just run:
docker run --rm \
-v "$(pwd)/config":/tmp/docker-mailserver \
2016-05-10 07:37:47 +02:00
-ti tvial/docker-mailserver:latest generate-dkim-config
2016-04-24 17:20:18 +02:00
Now the keys are generated, you can configure your DNS server by just pasting the content of `config/opedkim/keys/domain.tld/mail.txt` in your `domain.tld.hosts` zone.
2016-04-24 17:49:08 +02:00
```
; OpenDKIM
mail._domainkey IN TXT ( "v=DKIM1; k=rsa; "
2016-04-24 17:49:31 +02:00
"p=AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN" ) ; ----- DKIM key mail for domain.tld
2016-04-24 17:49:08 +02:00
2016-06-01 04:16:51 +02:00
```
## Verify-only
If you want DKIm to only verify incoming emails, the following version of /etc/opendkim.conf may be useful (right now there is no easy mechanism for installing it other than forking the repo):
```
# This is a simple config file verifying messages only
#LogWhy yes
Syslog yes
SyslogSuccess yes
Socket inet:12301@localhost
PidFile /var/run/opendkim/opendkim.pid
ReportAddress postmaster@voneicken.com
SendReports yes
Mode v
2016-04-24 17:49:08 +02:00
```