Opendkim
Installation
Création de la structure
mkdir -p /etc/opendkim/keys/domain.fr
chown -R opendkim:opendkim /etc/opendkim
chmod 700 /etc/opendkim/keys/domain.fr
Génaration des clés et du selecteur
Le selecteur est prod pour le domaine domain.fr
cd /etc/opendkim/keys/domain.fr
opendkim-genkey -b 2048 -d domain.fr -s prod
chown opendkim:opendkim prod.private
chmod 600 prod.private
Configuration OpenDKIM
DKIM
Syslog yes
SyslogSuccess yes
LogWhy yes
Mode sv
Canonicalization relaxed/relaxed
Socket inet:8891@localhost
UserID opendkim:opendkim
KeyTable /etc/opendkim/KeyTable
SigningTable refile:/etc/opendkim/SigningTable
InternalHosts refile:/etc/opendkim/TrustedHosts
ExternalIgnoreList refile:/etc/opendkim/TrustedHosts
Keytable
Signing table
Trusted host
Configuration Postfix
Main
milter_protocol = 6
milter_default_action = accept
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
Master
submission inet n - n - - smtpd
-o smtpd_milters=inet:localhost:8891
-o non_smtpd_milters=inet:localhost:8891
smtps inet n - n - - smtpd
-o smtpd_milters=inet:localhost:8891
-o non_smtpd_milters=inet:localhost:8891
Application
DNS
Dès que la signature est vu dans le log postfix, il faut deployer la clé publique dans le dns