• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

OpenDKIM slows to a crawl outgoing mails at Postfix

IPTRACE

Active Member

Thanks: 20
Messages: 198

#1
Hello!

The issue is like in the subject.
OpenDKIM signs mails and it takes too much time.

Example (50 MB mail size):
Without OpenDKIM: transmission time is around 5 sec.
With OpenDKIM: transmission time is around 120 sec.

I was looking at Postfix logs and the issue was by the OpenDKIM.
So, I've disabled the service and mails flow works like a charm.

CPU usage ca. 1%.

OS: FreeBSD 11.1p4 (bhyve)
Service: opendkim-2.10.3_7
Mail: postfix-3.2.3_1,1

opendkim.conf
Code:
LogWhy                  yes
Syslog                  yes
SyslogSuccess           yes
NameServers             8.8.8.8, 8.8.4.4

Canonicalization        relaxed/simple

KeyTable                /usr/local/etc/mail/KeyTable
SigningTable            /usr/local/etc/mail/SigningTable
SignatureAlgorithm      rsa-sha256

Socket                  inet:8891@localhost
DNSConnect              yes
DNSTimeout              5

ReportAddress           root
SendReports             yes

TemporaryDirectory      /var/db/opendkim/tmp
main.cf
Code:
smtpd_milters = inet:127.0.0.1:8891, inet:127.0.0.1:8893
non_smtpd_milters = $smtpd_milters
milter_default_action = accept
Thanks for any help.