【问题标题】:DKIM DNS Record found but emails indicate no signature found找到 DKIM DNS 记录,但电子邮件显示未找到签名
【发布时间】:2017-03-30 05:51:00
【问题描述】:

当我扫描我的 DNS 记录时,可以找到我的 DKIM 记录,但是当我发送电子邮件时,没有找到 DKIM 签名。以下是我认为有助于解决此问题的初步信息。任何帮助将不胜感激。

注册商\域名服务器:Godaddy 主办:数字海洋 操作系统:Ubuntu 14.04

DNS 记录(DKIM 测试网站找到 domainkey 并指示没有错误):

TXT default._domainkey  v=DKIM1; g=*; k=rsa; p=domainkeygoeshere    600 seconds

邮件:

echo "just a new test" | mail -s "email contents" to@destination.com -aFrom:from@mydomain.com

回复:

DKIM Information:
DKIM Signature
This message does not contain a DKIM Signature
dkim=none header.d=mydomain.com; x-hmca=none header.id=from@mydomain.com

==========================================================
Summary of Results
==========================================================
SPF check:          pass
DomainKeys check:   neutral
DKIM check:         permerror
SpamAssassin check: ham


"permerror"
  The message could not be verified due to some error that
  is unrecoverable, such as a required header field being
  absent. A later attempt is unlikely to produce a final result.

DKIM 安装(按照本教程):

 https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy

文件:/etc/opendkim/TrustedHosts

127.0.0.1
localhost
192.168.0.1/24
mydomain.com
12.12.12.12

*.mydomain.com

#*.example.net
#*.example.org

文件:/etc/opendkim/KeyTable

default._domainkey.mydomain.com     mydomain.com:mail:/etc/opendkim/keys/mydomain.com/mail.private

#mail._domainkey.example.net    example.net:mail:/etc/opendkim/keys/example.net/mail.private
#mail._domainkey.example.org   example.org:mail:/etc/opendkim/keys/example.org/mail.private

文件:/etc/opendkim/SigningTable

*@mydomain.com default._domainkey.mydomain.com

#*@example.net mail._domainkey.example.net
#*@example.org mail._domainkey.example.org

root@mydomain:/etc/opendkim/keys/mydomain.com# ls

mail.private  mail.txt

【问题讨论】:

    标签: ubuntu-14.04 digital-ocean dkim domainkeys


    【解决方案1】:

    很难使用该信息进行调试,但请尝试从您的配置文件中删除 _domainkey


    我的配置:

    DNS-Record

    TXT   mail._domainkey   v=DKIM1; h=sha256; k=rsa; p=*key*   600
    

    /etc/opendkim.conf

    OversignHeaders         From
    Canonicalization        relaxed/relaxed
    ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts
    InternalHosts           refile:/etc/opendkim/TrustedHosts
    KeyTable                refile:/etc/opendkim/KeyTable
    LogWhy                  Yes
    MinimumKeyBits          1024
    Mode                    sv
    PidFile                 /var/run/opendkim/opendkim.pid
    SigningTable            refile:/etc/opendkim/SigningTable
    Socket                  inet:8891@localhost
    Syslog                  Yes
    SyslogSuccess           Yes
    TemporaryDirectory      /var/tmp
    UMask                   022
    UserID                  opendkim:opendkim
    

    /etc/opendkim/KeyTable

    domain.tld domain.tld:mail:/etc/opendkim/mail
    

    /etc/opendkim/SigningTable

    *@domain.tld domain.tld
    

    /etc/opendkim/TrustedHosts

    127.0.0.1
    

    /etc/postfix/main.cf

    smtpd_milters           = inet:127.0.0.1:8891
    non_smtpd_milters       = $smtpd_milters
    milter_default_action   = accept
    

    还可以使用ls -la 检查/etc/opendkim/ 目录的所有者和权限,或者使用以下命令重新设置它们:

    chown -Rv opendkim:opendkim /etc/opendkim
    chmod go-rwx /etc/opendkim/*
    

    postfix和opendkim配置后你重启了吗?

    service opendkim restart
    service postfix restart
    

    我希望这会有所帮助,您可以找出问题所在。

    【讨论】:

    • 我会试一试,告诉你我的立场,谢谢。
    • 这太奇怪了。使用 chown + chmod 命令并重新启动服务修复了问题,因此我的 DKIM 签名被识别。谢谢!
    • 我能知道这里的UMASK是什么吗? Mor me Umask 是 007。在某些网站上是 002。我检查了 opendkim 的用户 ID。使用id -u opendkim 是 102。我应该将 UMask 作为 102 吗? @Oxados,@alicia233
    • @Tessaracter 抱歉,您与我的名字的链接无效,所以我没有收到您的评论通知……迟到总比抱歉好:/etc/opendkim 中文件的 umask目录应该是 700 并且归 opendkim:opendkim (user + group) 所有
    猜你喜欢
    • 2019-11-06
    • 1970-01-01
    • 2012-05-30
    • 2015-05-16
    • 1970-01-01
    • 1970-01-01
    • 2012-11-15
    • 2018-11-27
    • 1970-01-01
    相关资源
    最近更新 更多