Opendkim won’t start

In short: I can’t get opendkim to start.


I want to use opendkim with Postfix.

When I try to start opendkim …
$ sudo systemctl start opendkim
… I don’t go back to the command line (until I decide to hit CTRL-C), it is like the program isn’t going into the background.

$ sudo systemctl status opendkim
× opendkim.service – DomainKeys Identified Mail (DKIM) Milter
Loaded: loaded (/usr/lib/systemd/system/opendkim.service; enabled; preset: disabled)
Active: failed (Result: timeout) since Mon 2024-06-10 13:55:45 UTC; 13min ago
Duration: 740us
Docs: man:opendkim(8)
man:opendkim.conf(5)
man:opendkim-genkey(8)
man:opendkim-genzone(8)
man:opendkim-testadsp(8)
man:opendkim-testkey
http://www.opendkim.org/docs.html
Process: 2244047 ExecStart=/usr/local/sbin/opendkim -p inet:12301@localhost (code=exited, status=0/SUCCESS)
CPU: 4ms

Jun 10 13:54:15 ip-172-31-9-176.us-east-2.compute.internal systemd[1]: Starting opendkim.service – DomainKeys Identified Mail (DKIM) Milter…
Jun 10 13:54:15 ip-172-31-9-176.us-east-2.compute.internal systemd[1]: opendkim.service: Can’t open PID file /run/opendkim/opendkim.pid (yet?) after start: No such file or directory
Jun 10 13:55:45 ip-172-31-9-176.us-east-2.compute.internal systemd[1]: opendkim.service: start operation timed out. Terminating.
Jun 10 13:55:45 ip-172-31-9-176.us-east-2.compute.internal systemd[1]: opendkim.service: Failed with result ‘timeout’.
Jun 10 13:55:45 ip-172-31-9-176.us-east-2.compute.internal systemd[1]: Failed to start opendkim.service – DomainKeys Identified Mail (DKIM) Milter.
[ec2-user@ip-172-31-9-176 ~]$


  • I’m on AWS with Amazon Linux 2023.
  • I downloaded opendkim-2.10.3, ran ‘configure’, ‘make’, ‘make install’.
  • I do have an ‘opendkim’ user/group, which does have full permission to /run/opendkim (owned by opendkim.opendkim)
    I eventually gave that folder 777 permissions,although that didn’t help( Also, I realize it won’t would stay that way)

Any help would be greatly appreciated.

Thanks.

  • Brian Jacobs

Below is the contents of /usr/lib/systemd/system/opendkim.service

# If you are using OpenDKIM with SQL datasets it might be necessary to start OpenDKIM after the database servers.
# For example, if using both MariaDB and PostgreSQL, change "After=" in the "[Unit]" section to:
# After=network.target nss-lookup.target syslog.target mariadb.service postgresql.service

[Unit]
Description=DomainKeys Identified Mail (DKIM) Milter
Documentation=man:opendkim(8) man:opendkim.conf(5) man:opendkim-genkey(8) man:opendkim-genzone(8)    man:opendkim-testadsp(8) man:opendkim-testkey http://www.opendkim.org/docs.html
After=network.target nss-lookup.target syslog.target

[Service]
Type=forking
PIDFile=/run/opendkim/opendkim.pid
#PIDFile=/var/run/opendkim/opendkim.pid
EnvironmentFile=/etc/sysconfig/opendkim
ExecStart=/usr/local/sbin/opendkim -p inet:12301@localhost
#ExecStart=/usr/local/sbin/opendkim $OPTIONS -x /etc/opendkim.conf
ExecReload=/bin/kill -USR1 $MAINPID
User=opendkim
Group=opendkim

[Install]
WantedBy=multi-user.target

Below is the contents of /etc/opendkim.conf

AutoRestart             Yes
AutoRestartRate         10/1h
UMask                   002
Syslog                  yes
SyslogSuccess           Yes
LogWhy                  Yes

Canonicalization        relaxed/simple

ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts
InternalHosts           refile:/etc/opendkim/TrustedHosts
KeyTable                refile:/etc/opendkim/KeyTable
SigningTable            refile:/etc/opendkim/SigningTable

Mode                    sv
PidFile                 /run/opendkim/opendkim.pid
SignatureAlgorithm      rsa-sha256

UserID                  opendkim:opendkim

Socket                  inet:12301@localhost

Below is the contents of /etc/sysconfig/opendkim (I think this is being used)

SOCKET="inet:12301@localhost"

Below is the contents of /etc/default/opendkim ( I don’t think this is being used)

SOCKET="inet:12301@localhost"

New contributor

Brian Jacobs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật