SYNOPSYS

DomainKeys Identified Mail

PROCEDURE

/usr/sbin/opendkim-genkey -D /etc/dkimkeys -d asynk.ch -s 2021
chown opendkim:opendkim /etc/dkimkeys/2021.*
chmod 0600 /etc/dkimkeys/2021.*

/etc/dkimkeys/2021.private
/etc/dkimkeys/2021.txt » /var/cache/bind/asynk.ch
/usr/sbin/rndc reload asynk.ch

1
2
dig +short SOA asynk.ch
dig +short TXT 2021._domainkey.asynk.ch

mkdir -p /var/spool/postfix/opendikim/
chown opendkim:opendkim /var/spool/postfix/opendikim
chmod 750 /var/spool/postfix/opendikim

/usr/sbin/usermod postfix -G opendkim

/etc/opendkim.conf

1
2
3
4
5
6
Mode                    sv      # signing & verify capabilities

Domain                  asynk.ch
Selector                2021
KeyFile                 /etc/dkimkeys/2021.private
Socket                  local:/var/spool/postfix/opendikim/opendkim.sock

/etc/postfix/main.cf

1
2
3
smtpd_milters = unix:/run/opendikim/opendkim.sock
non_smtpd_milters = $smtpd_milters
milter_default_action = accept

1
2
systemctl restart opendkim
systemctl restart postfix

https://dkimvalidator.com/
https://mxtoolbox.com/dkim.aspx