我有一个邮件服务器运行带有Exim + Dovecot + Spamassassin v3.4.0和VestaCP的CentOS 7。 一切工作正常,但检查spamassassin的时间过长。需要10-11秒。
在spamassassin调试日志中,我看到DNS查询DKIM记录的问题(第一条日志行),并以10秒的超时终止(第三条日志行)。并且它未通过DKIM测试。
Sun Jul 14 14:47:12 2019 [94687] dbg: dkim: performing public key lookup and signature verification
Sun Jul 14 14:47:22 2019 [94687] dbg: dkim: DKIM, i=@yandex.ru, d=yandex.ru, s=mail, a=rsa-sha256, c=relaxed/relaxed, invalid, matches author domain
Sun Jul 14 14:47:22 2019 [94687] dbg: dkim: signature verification result: INVALID (PUBLIC KEY: DNS QUERY TIMEOUT FOR MAIL._DOMAINKEY.YANDEX.RU)
Sun Jul 14 14:47:22 2019 [94687] dbg: dkim: adsp: performing lookup on _adsp._domainkey.yandex.ru
Sun Jul 14 14:47:22 2019 [94687] dbg: dkim: adsp result: U/unknown (dns: unknown), author domain 'yandex.ru'
Sun Jul 14 14:47:22 2019 [94687] dbg: spf: checking to see if the message has a Received-SPF header that we can use
Sun Jul 14 14:47:22 2019 [94687] dbg: spf: checking HELO (helo=forward400j.mail.yandex.net, ip=5.45.198.245)
Sun Jul 14 14:47:22 2019 [94687] dbg: dns: bgsend, DNS servers: [8.8.8.8]:53, [8.8.4.4]:53
Sun Jul 14 14:47:22 2019 [94687] dbg: dns: attempt 1/2, trying connect/sendto to [8.8.8.8]:53
Sun Jul 14 14:47:22 2019 [94687] dbg: dns: providing a callback for id: 49973/IN/SPF/forward400j.mail.yandex.net
Sun Jul 14 14:47:22 2019 [94687] dbg: dns: dns reply 690 is OK, 4 answer records
Sun Jul 14 14:47:22 2019 [94687] dbg: async: calling callback on key dns:A:yandex.ru
Sun Jul 14 14:47:22 2019 [94687] dbg: dns: hit <dns:yandex.ru> 5.255.255.5
Sun Jul 14 14:47:22 2019 [94687] dbg: dns: hit <dns:yandex.ru> 77.88.55.50
Sun Jul 14 14:47:22 2019 [94687] dbg: dns: hit <dns:yandex.ru> 77.88.55.88
Sun Jul 14 14:47:22 2019 [94687] dbg: dns: hit <dns:yandex.ru> 5.255.255.88
如果我在同一封电子邮件中对spamassassin -t -D dkim
进行了特殊检查,则快速迁移可以快速进行并且DKIM通过测试。
# spamassassin -t -D dkim < /home/admin/mail/domain/user/cur/messageId
Jul 14 20:46:49.922 [24398] dbg: dkim: using Mail::DKIM version 0.39
Jul 14 20:46:49.923 [24398] dbg: dkim: performing public key lookup and signature verification
Jul 14 20:46:49.962 [24398] dbg: dkim: DKIM, i=@yandex.ru, d=yandex.ru, s=mail, a=rsa-sha256, c=relaxed/relaxed, pass, matches author domain
Jul 14 20:46:49.962 [24398] dbg: dkim: signature verification result: PASS
我该如何解决这个问题?
答案 0 :(得分:0)
使用安装本地DNS解析器而不是使用Google DNS来解决。