大网数据广告活动
服务器运维问答

OpenDKIM won't start: "opendkim: milter socket must be specified"

· 52CE 我爱测

I'm trying to setup a server using postfix, dovecot, amavis and opendkim for signing. OpenDKIM won't start, here is the output of journalctl -xe , after stopping and starting opendkim: Jul 21 21:54:17 mail systemd[1]: Starting Op…

问题原文

原帖链接 · UnlegitApple · CC BY-SA 4.0

I'm trying to setup a server using postfix, dovecot, amavis and opendkim for signing.

OpenDKIM won't start, here is the output of journalctl -xe, after stopping and starting opendkim:

Jul 21 21:54:17 mail systemd[1]: Starting OpenDKIM DomainKeys Identified Mail (DKIM) Milter...
-- Subject: A start job for unit opendkim.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit opendkim.service has begun execution.
--
-- The job identifier is 54385.
Jul 21 21:54:17 mail opendkim[108677]: opendkim: milter socket must be specified
Jul 21 21:54:17 mail systemd[1]: opendkim.service: Control process exited, code=exited, status=78/CONFIG
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit opendkim.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 78.
Jul 21 21:54:17 mail systemd[1]: opendkim.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit opendkim.service has entered the 'failed' state with result 'exit-code'.

My OpenDKIM (/etc/opendkim.conf) config looks like this:

Syslog              yes
LogResults          yes
LogWhy              yes
SyslogSuccess       yes
UMask               002
Canonicalization    relaxed/relaxed

# Only sign, don't verify (Amavis takes care of the verification)
Mode                s

KeyTable            /etc/opendkim/keytable
SigningTable        refile:/etc/opendkim/signingtable

As you could see in the config, I only want OpenDKIM to sign, not verify.

已采纳解答

原帖链接 · Esa Jokinen · CC BY-SA 4.0

As the error says, you should specify the socket. The mandatory configuration parameter can be found on opendkim.conf documentation:

Socket (string)

Specifies the socket that should be established by the filter to receive connections from sendmail(8) in order to provide service. socketspec is in one of two forms: 

  • local:path, which creates a UNIX domain socket at the specified path, or
  • inet:port[@host] or inet6:port[@host] which creates a TCP socket on the specified port and in the specified protocol family.

If the host is not given as either a hostname or an IP address, the socket will be listening on all interfaces. A literal IP address must be enclosed in square brackets. This option is mandatory either in the configuration file or on the command line.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-07-21)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。