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

AWS and G Suite SPF records

· 52CE 我爱测

I may be going about this all wrong, if so please point me to the nearest learning resource. I currently have a G Suite account for handling email addresses for my domain (so I currently just have [email omitted] ). I have an app…

问题原文

原帖链接 · TrivialCase · CC BY-SA 3.0

I may be going about this all wrong, if so please point me to the nearest learning resource.
I currently have a G Suite account for handling email addresses for my domain (so I currently just have [email omitted]). I have an app hosted at mydomain.com and plan on sending out some user verification emails (from [email omitted]), so I signed up for an AWS SES account to handle the mailing.

I would like to do what I can to prevent spam coming from my domain, and I sort of understand that SPF records enable me to do that. So the question is, as there can only be one such record, how do I set it up for my use case? Do I set it up to allow only stuff sent through amazonses, which I believe would look like

v=spf1 include:amazonses.com -all

or do I do it for G Suite? or neither, or both?

In my mind, I think it should just be the AWS record since that is my outgoing, but I don't want it to prevent incoming mail to my G Suite accounts.

已采纳解答

原帖链接 · Tim · CC BY-SA 4.0

You need to include each MTA that might send email on behalf of your domain. Start with the soft fail operator ~all to check everything is working (headers may give some clues), then move on to the hard fail operator -all.

v=spf1 include:_spf.google.com include:amazonses.com ~all

Wikipedia has a good primer on SPF, including what soft/hard fail mean. There's also an interesting analysis of the number of lookups here.

Qualifiers

NB: this section copied directly from Wikipedia. Each mechanism can be combined with one of four qualifiers:

  • + for a PASS result. This can be omitted; e.g., +mx is the same as mx.
  • ? for a NEUTRAL result interpreted like NONE (no policy).
  • ~ (tilde) for SOFTFAIL, a debugging aid between NEUTRAL and FAIL. Typically messages that return a SOFTFAIL are accepted but tagged.
  • Use - (minus) for FAIL, the mail should be rejected (see below).

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

资料来源与适用范围

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

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

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