To setup open dkim a couple of steps have to be made to install and configure the service and get it running. The example domain is noordwijk.nl, change it to yours. --- mkdir /etc/dkimkeys chown opendkim.opendkim /etc/dkimkeys
sudo -u opendkim opendkim-genkey -D /etc/dkimkeys -d noordwijk.nl -s 2020
Domain noordwijk.nl
Selector 2020
KeyFile /etc/dkimkeys/2020.private
Socket inet:8891@localhost
cp -rp /etc/postfix/main.cf /etc/postfix/main.cf_bak
vi /etc/postfix/main.cf
smtpd_milters = inet:localhost:8891
non_smtpd_milters = $smtpd_milters
systemctl restart opendkim
Following text record needs to go into the DNS Zonefile
user@host:~# cat /etc/dkimkeys/2020.txt
2020._domainkey IN TXT ( "v=DKIM1; k=rsa; "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqcS4IGfYnGeToHq7lziTCithEA5esxonnQjtp8hbVSGNDXeAAXQvdzg34QkpS/GCtsRa28XmnTw451dUDei/IE3CUrVet4SaYurERKzpwoBHyAMGCQgqgUzhGXpAOcL50XHXTtjZ9h1rdwyfTlg9YNosXrEXyF7Rt5YJOa/n3UQIDAQAB" ) ; ----- DKIM key 2020 for noordwijk.nl