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

How can I test the DKIM configuration of my server (Postfix + OpenDKIM)?

· 52CE 我爱测

I configured my server (Debian Jessie) and domain with DKIM. I installed OpenDKIM on my server, and followed this tutorial . I went to my domain provider, and set a new DNS TXT record for mail._domainkey.example.com : "v=DKIM1; k…

问题原文

原帖链接 · The Quantum Physicist · CC BY-SA 3.0

I configured my server (Debian Jessie) and domain with DKIM. I installed OpenDKIM on my server, and followed this tutorial. I went to my domain provider, and set a new DNS TXT record for mail._domainkey.example.com:

"v=DKIM1; k=rsa; p=ThePublicKey"`

Where I got the key from mail.txt, which was generated by the command:

opendkim-genkey -s mail -d example.com

I made sure that the OpenDKIM server is working, and that Postfix is signing the messages. However, I'm unable to find an unbiased way to check whether the emails sent from my server are signed properly.

By googling, I found this service, which gets me to send an email to it, and gives me a report on whether the signing is correct. However, it keeps saying that the signature is invalid in the end report:

SpamAssassin Score: 1.179
Message is NOT marked as spam
Points breakdown: 
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was blocked.
                            See
                            http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                             for more information.
                            [URIs: example.com]
 0.0 HTML_MESSAGE           BODY: HTML included in message
 0.3 HTML_IMAGE_ONLY_04     BODY: HTML: images with 0-400 bytes of words
 0.7 MPART_ALT_DIFF         BODY: HTML and text parts are different
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily valid
 0.0 TVD_SPACE_RATIO        No description available.
 0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid

Although it says in another part (at the DKIM Information, above that report) that it's valid. It says exacly:

Validating Signature

result = pass

While in mxtoolbox, it doesn't show that I have any syntax problem in my DNS entry. It's able to parse the public key without problems.

What can I do to find the problem with my DKIM setup?

已采纳解答

原帖链接 · The Quantum Physicist · CC BY-SA 3.0

Apparently the test at the site I linked has a problem, so, I found two ways to test my config (SSL, SPF, DKIM and DMARC):

  1. Using gmail. Simply send an email to some account of yours in gmail, and check the header of the message. Gmail has a section where it says if tests are passed.

  2. You can use port25. There's an email address there. Send it an email, and it'll reply with a report indicating whether your config is OK .

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

资料来源与适用范围

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

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

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