Skip to content
Glossary · Authentication

SPF macro

A placeholder such as %{i} or %{d} in an SPF record that the receiver replaces with a value from the SMTP session before doing the lookup.

What it means

SPF macros let a record compute the names it queries. The common ones are %{s} (the sender address), %{l} (its local part), %{d} (the domain being checked), %{i} (the connecting IP address) and %{h} (the HELO name). Modifiers reverse or truncate the value, as in %{ir} for the IP address with its parts reversed.

They are used mainly with exists, to ask a DNS server built for the purpose whether one address or one sender may send, and with exp to personalize an explanation.

Macros let the sender put arbitrary text into the receiver's DNS queries, so RFC 7208 tells receivers to expect hostile content, and the queries can tell the domain's DNS server who is mailing whom.

Example

v=spf1 exists:%{ir}.%{l1r+-}._spf.%{d} -all

Sources

What this definition rests on. The wording is ours; the facts are theirs.

All 432 terms in the glossaryThe wiki: blocklists and bounce codes

Beat · paid monitoring

A heartbeat for your email.

Beat runs every check on this site on a schedule: 41 checks, 25 blacklists and real inbox placement. The moment something breaks, it tells you what broke, why it matters, and the exact fix.

example.comWatching
  • SPFpass
  • DKIMpass
  • DMARCp=none
  • Blacklists0 of 25

Illustrative. Your domain, every few hours.

Also from us:Pulse: your own sending infrastructureConsulting: $65/hr, no retainer