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

34 lines
1.3 KiB
Markdown
Raw Normal View History

2016-04-24 15:20:18 +00: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 05:37:47 +00:00
-ti tvial/docker-mailserver:latest generate-dkim-config
2016-04-24 15:20:18 +00: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 15:49:08 +00:00
```
; OpenDKIM
mail._domainkey IN TXT ( "v=DKIM1; k=rsa; "
2016-04-24 15:49:31 +00:00
"p=AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN" ) ; ----- DKIM key mail for domain.tld
2016-04-24 15:49:08 +00:00
2016-06-01 02:16:51 +00: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 15:49:08 +00:00
```