[cc lang="bash"]
\$ apt-get install dkim-filter
\$ vi /etc/default/dkim-filter
\$ vi /etc/dkim-filter.conf
\$ vi /etc/postfix/dk.domains
\$ dkim-genkey -s mail -d jokeru.ro
\$ mv mail.private /etc/postfix/dk.key
\$ vi /etc/postfix/dk.sign
\$ service dkim-filter restart
\$ vi /etc/postfix/main.cf
\$ service postfix restart
\$ cat mail.txt; rm -f mail.txt
\$ vi /etc/bind/zone.jokeru.ro
\$ service bind9 reload
[/cc]
/etc/default/dkim-filter
[cc lang="bash"]
SOCKET="inet:8892@localhost" # Ubuntu default - listen on loopback on
port 8892
[/cc]
/etc/dkim-filter.conf
[cc lang="bash"]
Syslog yes
Domain /etc/postfix/dk.domains
KeyFile /etc/postfix/dk.key
Selector mail
Canonicalization relaxed/relaxed
Mode s
SignatureAlgorithm rsa-sha256
X-Header yes
InternalHosts /etc/postfix/dk.sign
ExternalIgnoreList /etc/postfix/dk.sign
[/cc]
/etc/postfix/dk.domains
[cc lang="bash"]
jokeru.ro
[/cc]
/etc/postfix/dk.sign
[cc lang="bash"]
127.0.0.1
10.20.30.40
[/cc]
/etc/postfix/main.cf
[cc lang="bash"]
.....
# DKIM
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8892
non_smtpd_milters = inet:localhost:8892
[/cc]
/etc/bind/zone.jokeru.ro
[cc lang="bash"]
.....
; DKIM
;Policy Record
_domainkey IN TXT "o=-"
;Selector Record
mail._domainkey IN TXT "k=rsa;
p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDtlAf0dNXkQGxDAPSgWl9iongp/LcYrK0XNXFicLsPaBqwFWAxC/MljjfERSOv0olN7ZgHyUkqdYCgSK73U3b++0ToQG5l3Vet1pXzYFwkrwW3xSDaDfxfulWtP5Nuch621d4lrh50pl7WJ/GHCiAtjAo9p8GPIZW43xNduoAtiQIDAQAB"
[/cc]