I have set up postfix with a milter (opendkim) and turned on debug loggning in opendkim. Nothing there except for start and stop notices, which means postfix does not even bother to contact opendkim.



So the problem is in postfix or its configuration.



Here is my config:



root@www:/etc/postfix# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-mail-stack-delivery.conf -m "${EXTENSION}"
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 6
mydestination = sebbe.eu, [178.174.189.88], [178.174.191.163]
myhostname = sebbe.eu
mynetworks = 192.168.0.0/16
myorigin = /etc/mailname
non_smtpd_milters = $smtpd_milters
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = no
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_milters = inet:localhost:8891
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_received_header = no
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = no
tls_random_source = dev:/dev/urandom
root@www:/etc/postfix#




Here is tail -f /var/log/syslog after first restarting opendkim, then postfix, and then while sending a mail through it:



root@www:/etc/postfix# service opendkim restart
Restarting OpenDKIM: opendkim.
root@www:/etc/postfix# service postfix restart
* Stopping Postfix Mail Transport Agent postfix [ OK ]
* Starting Postfix Mail Transport Agent postfix [ OK ]
root@www:/etc/postfix# tail -f /var/log/syslog
Jan 6 06:23:26 www NetworkManager[989]: <info> nameserver '192.168.25.1'
Jan 6 06:23:26 www NetworkManager[989]: <info> domain name 'sebbe.eu'
Jan 6 06:23:26 www dbus[559]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Jan 6 06:23:26 www dbus[559]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jan 6 06:25:01 www CRON[3997]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
Jan 6 06:28:36 www opendkim[3550]: OpenDKIM Filter: mi_stop=1
Jan 6 06:28:36 www opendkim[3550]: OpenDKIM Filter v2.6.8 terminating with status 0, errno = 0
Jan 6 06:28:36 www opendkim[4011]: OpenDKIM Filter v2.6.8 starting (args: -x /etc/opendkim.conf -u opendkim -P /var/run/opendkim/opendkim.pid)
Jan 6 06:28:41 www postfix/master[3952]: terminating on signal 15
Jan 6 06:28:41 www postfix/master[4115]: daemon started -- version 2.9.3, configuration /etc/postfix
Jan 6 06:29:13 www postfix/smtpd[4121]: connect from android-4f5b337152372538.sebbe.eu[192.168.25.104]
Jan 6 06:29:14 www postfix/smtpd[4121]: 5854F143E29: client=android-4f5b337152372538.sebbe.eu[192.168.25.104], sasl_method=PLAIN, sasl_username=sebastian
Jan 6 06:29:14 www postfix/cleanup[4128]: 5854F143E29: message-id=<2p7iyu6gnfn4d2yjkobtni7c.1357450152875@email.android.com>
Jan 6 06:29:14 www postfix/qmgr[4119]: 5854F143E29: from=<sebastian@sebbe.eu>, size=1340, nrcpt=1 (queue active)
Jan 6 06:29:14 www postfix/smtp[4129]: connect to gmail-smtp-in.l.google.com[2a00:1450:4010:c03::1b]:25: Network is unreachable
Jan 6 06:29:15 www postfix/smtp[4129]: 5854F143E29: to=<nielsen.sebastian@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.143.26]:25, delay=0.86, delays=0.16/0.01/0.36/0.33, dsn=2.0.0, status=sent (250 2.0.0 OK 1357450155 or6si95457491lab.52)
Jan 6 06:29:15 www postfix/qmgr[4119]: 5854F143E29: removed





Thats all. Whats the problem in postfix causing it not to process things through milter?