如何正确设置DNS SPF记录?

yll*_*ate 27 dns smtp spf amazon-web-services amazon-ses

我每周都会向订阅者发送电子邮件,结果发现邮件经常发送到用户的垃圾邮件文件夹.

我正在利用Amazon SES发送这些消息,并根据他们的指示添加了SPF记录:http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/SPFSenderIDDKIM.html?r = 3917

在查询我的域的SPF记录时,我从http://www.kitterman.com/spf/validate.html获得以下回复:

SPF record lookup and validation for: mydomain.tld

SPF records are primarily published in DNS as TXT records.

The TXT records found for your domain are:


SPF records should also be published in DNS as type SPF records.
Type SPF records found for the domain are:


Checking to see if there is a valid SPF record. 

Found v=spf1 record for mydomain.tld: 
v=spf1 include:amazonses.com ?all 

evaluating...
Results - record processed without error.

The result of the test (this should be the default result of your record) was, none . The explanation returned was,
Run Code Online (Sandbox Code Playgroud)

对于我的CloudFlare DNS记录,我有:

SPF  mydomain.tld   v=spf1 include:amazonses.com ?all   with automatic TTL
TXT  mydomain.tld   spf2.0/pra include:amazonses.com ?all   with automatic TTL
Run Code Online (Sandbox Code Playgroud)

电子邮件是从"no-reply@mydomain.tld"和"admin@mydomain.tld"发送的.

一些用户报告看到以下消息:"错误地显示为"退回邮件"响应的邮件(系统生成的电子邮件,您可能会在发送无法传递的邮件后自动获得该邮件,例如发送给无效的邮件地址)"

使用我目前的发送解决方案,我无法在电子邮件中添加DKIM.

如何解决这一问题,以便改善用户的任何收据问题?

Ste*_*pel 24

TXT您的域没有有效记录(请注意,测试不返回任何内容,请参阅下面的工作示例),这是由于TXT您定义的那些记录周围缺少引号引起的,例如在支持的记录类型中所解释的:

与大多数其他记录类型不同,对于TXT记录,数据字段基本上是自由格式的,甚至可能包含空格.请注意:输入包含空格的字符串(例如SPF记录)时,必须将该字符串括在双引号中; 否则,将单独引用单个单词并将记录分成多个部分.

以下是TXT我们目前根据验证您的电子邮件地址成功用于Amazon SES的记录(确实很遗憾,他们的文档无法解决报价需求):

"v=spf1 include:amazonses.com ~all"
"spf2.0/pra include:amazonses.com ~all"
Run Code Online (Sandbox Code Playgroud)

因此,这是我们域名的运行缩写结果:

SPF record lookup and validation for: [...]

SPF records are primarily published in DNS as TXT records.

The TXT records found for your domain are:
spf2.0/pra include:amazonses.com ~all 
v=spf1 include:amazonses.com ~all 

[...]

Checking to see if there is a valid SPF record. 

Found v=spf1 record for services.marescom.net: 
v=spf1 include:amazonses.com ~all 
Run Code Online (Sandbox Code Playgroud)