SPF(Sender Policy Framework)_第1张图片 

How does Sender ID Framework work?
1.Sender sends an e-mail to Receiver.
2.Receiver’s inbound e-mail server receives e-mail and calls its Sender ID Framework.
3.The Sender ID Framework looks up the SPF record of the domain that Sender is using for sending the mail.
4.The receiving Mail Transfer Agent (MTA) determines if the outbound Mail Server IP address matches IP addresses that are authorized to send mail for the user.

补充:

all has three switches that it can use:

  1. -: Do not accept any mail from anyone other than listed above; hard-fail.
     
  2. ~: Do not accept any email that does not come from one of the above; allow but soft-fail the email.
     
  3. ?: Indicates that there are more servers that may be sending from our domain.

以上内容摘自微软官网

 

举个例子:

v=spf1 include:mail.zhuzhu.com ~all

~ 表示软失败,通常表示测试没有完成。(通常称之为软失败)

- 表示测试失败。这个值通常是 -all,表示没有其他任何匹配发生。(称之为硬失败,比喻很形象非对即错。)

? 表示不置可否。这个值也通常在测试没有完成的时候使用。

内容很简单,但是很重要。