我已经在域上设置了一个带有 opendkim 的 smtp postfix 服务器code-gmail.com
我已将 spf 策略、dkim、dmarc 放入我的域 TXT 记录中。我确实设置了反向 DNS,以便正确指向我的域,我填写了 mx 服务器 (mail.code-gmail.com),尽管我还没有用于处理传入邮件的 pop3/imap 服务器。所以我决定进行测试www.mail-tester.com
,结果如下:
https://www.mail-tester.com/web-cwl7x
如您所见,一切都很好,我的 IP 不在 mail teser 的任何黑名单上,所有检查基本上都很好。这是我的 vps IP 检查:
https://mxtoolbox.com/SuperTool.aspx?action=blacklist%3a94.156.35.221&run=toolpage
以下是被 Google 拒绝的源消息:
Delivered-To: [email protected]
Received: by 10.138.18.148 with SMTP id p20csp4976847ocs;
Tue, 1 May 2018 09:23:28 -0700 (PDT)
X-Google-Smtp-Source: AB8JxZphPyaP52N0Vo0YpZdurlUaf5/jfaqpLwcyt15ne8k/OjWcjDppRKuXA8+jqIWJiRVOt9vw
X-Received: by 10.28.177.197 with SMTP id a188mr9309507wmf.121.1525191808352;
Tue, 01 May 2018 09:23:28 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1525191808; cv=none;
d=google.com; s=arc-20160816;
b=kLoVVH/zEgvAcSSIEYqRCqj8OhPsxFvh8QFZK3QSuwWLelfcsfFX7BDje6aFZGqYqx
rpqL9piArj2/uX5yilQA0TtOfF5oHp4slKS3eA10xD3mEI0WQ0ndn9c3jEJKVGs/InGC
Z3ToNpl2hgXeR6iZNxI5RNJkGZcoJ9rfFQf2Ksc1Aa1PLUKDhoTFCD9rl7ReToHIGcUH
31DrhwRRpBu2FgO0ieXVnmDeFjU+mRpoDOXV8Rb5VbV1tgRSxgd+25FjVSp/DmGjUWrW
xmX7FaZqQwCtlrikRTxCFMCjPH9GcKvlJPOZj1I2scXJIbOixrq5enC4IwLRRi4kAJ9s
YlXQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
h=from:date:message-id:to:subject:dkim-signature
:arc-authentication-results;
bh=QY3eSg1xUkClxZc7O05HDfwJPvSkbBuZINP6T4PQvjc=;
b=guQW86/LrMSBUXT5jv3tE49/OrXqEHvvI9M/8NhrUMLMUNumFHr2Ut8Hbh5TeuBfSH
9NW2G2p6Rk6HIS2twdvp6EgecNiiNGVR8JrBjQLs4kvAw4tCveIcechv9kq6loosMWlF
pS4hcWzLyBr9OIDIJJ7MDX3P8HMR+BMrm+yu2ujFuvvDxsk1ky6jaLSTE3/2Hyk55SRU
U9N2zQ8fbhrZrAGjZXya6k1tXNpmNInKJrhKMjYr4/kbDAME70bqd51hBPOYVnDc0aV7
3+EBz44sxAzjnuOSWIWAkaZie2pPdSy6BPFh08Y4h/mViBDxibjvfDi8+Bew7BW08yWe
VIVQ==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass [email protected] header.s=mail header.b=jGd+dERp;
spf=pass (google.com: domain of [email protected] designates 94.156.35.221 as permitted sender) [email protected];
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=code-gmail.com
Return-Path: <[email protected]>
Received: from code-gmail.com (code-gmail.com. [94.156.35.221])
by mx.google.com with ESMTPS id l9-v6si23460wrf.176.2018.05.01.09.23.28
for <[email protected]>
(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
Tue, 01 May 2018 09:23:28 -0700 (PDT)
Received-SPF: pass (google.com: domain of [email protected] designates 94.156.35.221 as permitted sender) client-ip=94.156.35.221;
Authentication-Results: mx.google.com;
dkim=pass [email protected] header.s=mail header.b=jGd+dERp;
spf=pass (google.com: domain of [email protected] designates 94.156.35.221 as permitted sender) [email protected];
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=code-gmail.com
Received: by code-gmail.com (Postfix, from userid 0) id 4314B100E8B; Tue,
1 May 2018 12:23:27 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=code-gmail.com; s=mail; t=1525191807; bh=QY3eSg1xUkClxZc7O05HDfwJPvSkbBuZINP6T4PQvjc=; h=Subject:To:Date:From:From; b=jGd+dERp+63VqVk00N2izdi/FQrlJWfK0VbzSuE9LOtOd2AXo/fNKcCb8lH9Zf7zl
6VX5OTfXpKKWlD39fnnfAE7Kolytr6iLQvapHTq77h76Bcyga6PC7oCH8v33VxpVdT
RuaYUTwK57Ar+fsnKpFPWWtj0dYRqHpL1NJCQQQUt4VD4aQ0w78+iHF/RGfQpIrSOE
6Ve2vP/D9h58OuE+o3jR3ly+6e6LKaVewul45dDMhgFdzqGAQOIF7Md56AGspGLE+B
UMpRWBFC6ordrcr23710qK7U418ddx+1qwHnHioG6WM4ZU+hAJfg1h2AucIyJjqjkb
IMlltYlM1W30Q==
Subject: Lol hi mate! We need to build stuff as soon as possible
To: <[email protected]>
X-Mailer: mail (GNU Mailutils 3.1.1)
Message-Id: <[email protected]>
Date: Tue,
1 May 2018 12:23:27 -0400 (EDT)
From: root <[email protected]>
Hellp there mate. What about those vehicles?
有人能帮忙吗?我想我可能对 dmarc/dkim 做了一些错误。我的德金看起来像这样:
mail._domainkey.code-gmail.com IN TXT v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtRdiLkqfjnqh5Dj6YLZqm1X+khDI1diBEEyj1F3NwSbay8n3qUoX6QtBDDb+7DClerJBT5BSW4OUPdnf1UgimrKOdtb/KjE2gTKbQXBrlvXP0++DjTzayu724hsavwl7yYThndqurDJWKLjZxwmjb8KJwuvPSnUXzCuN4zDBheYtLKP0RBYB3B3VauRuDKPot2/1iihVqHycrB0oe2ohOxWJz47qxp1vylkMTtwIDy/6Pe2JK/Dph70JvI3mIIdkQGT8P1dcGdemVonCfvYQaluVSXvmfxl32PHN50RAu0PzNYEk0/+UIXUQxCFbGNSnUbAWWrYbKjxFBvjQU5sywwIDAQAB
和密钥的相同 dkim 条目:default._domainkey.code-gmail.com
我的防晒指数:
v=spf1 include:_spf.google.com ip4:94.156.35.221 ip6:2a07:5741:0:eb4:0:0:0:1 ip6:2a07:5741:0:eb4::1 ~all
我的德马克:
_dmarc.code-gmail.com IN TXT v=DMARC1; p=none
我也确实注册了 postmaster.gmail.com,并且在那里使用 TXT 记录验证了我的网站,如下所示:
code-gmail.com IN TXT google-site-verification=r5XK7qGOY2bA43-bkq9jCrFzt7fYDXAdsdVmrp3XEw390Cxo
我在 Postfix 中启用了加密,因此到达 gmail 的信件是使用 TLS 加密的。
有人能帮忙吗?我很确定 dmarc 或 dkim 有问题。
我从我的 vps 发送测试电子邮件mail
,如下所示:
echo "Making a pizza" | mail -s "Semolina flour and good salami with the plume tomatoes, are the only secret." [email protected]
这就是为什么它默认为[电子邮件保护]
答案1
我不认为这是技术问题。您可以在电子邮件的邮件标题中看到 DKIM、SPF 和 DMARC 配置正确。我认为这是电子邮件正文的问题。Gmail 具有严格的垃圾邮件过滤器,因此您的电子邮件落入垃圾邮件文件夹也就不足为奇了。更改文本并再次测试。
我建议添加https://www.emailchecky.com/添加到您的工具集。此免费工具可分析电子邮件,而不仅仅是进行表面检查。它是 Mail-Tester 的一个很好的补充。