2

I have set postfix with milter based on this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy

But then posptfix reported that it can't connect to milter on that socket

I changed socket to in postfix main.cf to :

    smtpd_milters = /var/run/opendkim/opendkim.sock
    non_smtpd_milters = /var/run/opendkim/opendkim.sock

and opendkim /etc/default/opendkim to:

SOCKET="local:/var/run/opendkim/opendkim.sock" # default

Now i get following warning and my mails are not signed:

Oct 28 18:45:12 localhost postfix/cleanup[22881]: warning: Milter service needs transport:endpoint instead of "/var/run/opendkim/opendkim.sock"

How can I solve this?

Anom
  • 111
  • 2
  • 3

1 Answers1

5

As stated in the error, the value of parameter smtpd_milters and non_smtpd_milters wasn't correct. The right one is

smtpd_milters = unix:/var/run/opendkim/opendkim.sock
non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock

As stated in official documentation

The general syntax for listening sockets is as follows:

unix:pathname

Connect to the local UNIX-domain server that is bound to the specified pathname. If the smtpd(8) or cleanup(8) process runs chrooted, an absolute pathname is interpreted relative to the Postfix queue directory.

inet:host:port

Connect to the specified TCP port on the specified local or remote host. The host and port can be specified in numeric or symbolic form.

masegaloeh
  • 17,978
  • 9
  • 56
  • 104
  • Oct 30 22:24:34 localhost postfix/cleanup[25386]: warning: connect to Milter service unix:/var/run/opendkim/opendkim.sock: No such file or directory And I can see the opendkim.sock in /var/run/opendkim – Anom Oct 30 '14 at 21:43
  • 1
    Well, that's another problem. See here for some suggestions http://unix.stackexchange.com/questions/74477/postfix-smtpd-warning-connect-to-milter-service-unix-var-run-opendkim-opendki – masegaloeh Oct 31 '14 at 05:27
  • What's the difference between "local" and "unix" keywords in a path to a unix socket? – Incerteza Sep 10 '20 at 10:00