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

SPF redirect modifier

· 52CE 我爱测

The SPF record for domain replace the current record. The macro-expanded domain is also substituted for the current-domain in those look-ups. Examples: In the following example, the client IP is 1.2.3.4 and the current-domain is …

问题原文

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

The SPF record for domain replace the current record. The macro-expanded domain is also substituted for the current-domain in those look-ups.

Examples:

In the following example, the client IP is 1.2.3.4 and the current-domain is example.com.

"v=spf1 redirect=example.com"

If example.com has no SPF record, that is an error; the result is unknown. Suppose example.com's SPF record was "v=spf1 a -all". Look up the A record for example.com. If it matches 1.2.3.4, return Pass. If there is no match, the exec fails to match, and the -all value is used.

The domain and current-domain meaning is not very clear here.

What happens, if example1.com spf was queried,

example1.com IN MX 0 mx.example1.com.    
example1.com IN TXT "v=spf1 redirect=example2.com"
mx.example1.com IN A 1.1.1.1

example2.com IN MX 0 mx.example2.com.
example2.com IN TXT "v=spf1 mx -all"
mx.example2.com IN A 2.2.2.2

Should the spf result be 1.1.1.1 OR 2.2.2.2?

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 3.0

When you redirect to a domain, the redirected domain becomes the target for all subsequent DNS lookups, such as those performed by mx.

See RFC 7208 § 6.1:

The <domain-spec> portion of the redirect section is expanded as per the macro rules in Section 7. Then check_host() is evaluated with the resulting string as the <domain>. The <ip> and <sender> arguments remain the same as in the current evaluation of check_host().

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

资料来源与适用范围

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

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

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