我在Ubuntu 16 LTS,试图用opendkim签署邮件,我得到:
$ tail /var/log/mail.err ... Milter (opendkim): error connecting to filter: Connection refused by localhost
我有sendmailconfiguration:
INPUT_MAIL_FILTER(`opendkim', `S=inet:8891@localhost')dnl
在/etc/opendkim.conf有:
Socket inet:8891@localhost
当我用lsof检查的时候,我没有看到8891上听到的东西:
$ sudo lsof -i :8891 -n [nothing]
看着opendkim的状态说它正在运行:
$ systemctl status opendkim.service ... Active: active (running) ...
8891为什么不听呢?
opendkim还有另一个configuration文件, /etc/default/opendkim ,该文件指定了一个不同的默认套接字:
# Command-line options specified here will override the contents of # /etc/opendkim.conf. See opendkim(8) for a complete list of options. ... SOCKET="local:/var/run/opendkim/opendkim.sock"
注释掉这一行,并在下面的SOCKET="inet:8891@localhost"中工作。