Link to home
Create AccountLog in
Avatar of Jason Crawford
Jason CrawfordFlag for United States of America

asked on

{v=spf1 exists:%{i} -all}

I'm trying to find more info on the SPF record for  It is in a format I'm not familiar with:

PS C:\Users\jason.crawford> Resolve-DnsName -Name -Server -Type txt

Name                                     Type   TTL   Section    Strings
----                                     ----   ---   -------    -------                      TXT    2982  Answer     {v=spf1
                                                                 exists:%{i} -all}

Open in new window

Avatar of Tom Cieslik
Tom Cieslik
Flag of United States of America image

        "v=spf1 exists:%{i} ~all"

Open in new window

I believe you're asking about

This is one of types define a verification mechanism

ip4 - use IP Version 4 addresses, for example, for verification
ip6 - use IP Version 6 addresses for verification, for example, 2001:db8::10 for verification
a - use DNS A RRs for verification
mx - use DNS MX RRs for verification
ptr - use DNS PTR RRs for verification
exists - test for existence of domain

The existence (any valid A RR) of the specified domain allows the test to pass. Domain may use macro-expansion features.

Note: RFC 7208 Appendix C suggests a method by which the exists sender mechanism (in conjunction with a macro expansion) may be used to log DNS queries for every mail transaction and which may help in diagnosing SPF problems. While this indeed may be the case, it also may, depending on the mail volume being sent, generate significant DNS loads. Your choice.

You can read more here::
The %{i} macro resolves (expands? whatever the right word is...) to the IP address of the server attempting to send a message, so if the sending server's IP address is, then %{i} would be If a DNS record of that name exists, the SPF check passes.

Seems like a convoluted way to do it, but if it works, it works, and I assume Salesforce knows what they're doing.
Avatar of Jason Crawford


@Tom - thank you that helps.  I see %{i} denotes the following:

"sender-ip The IP of SMTP server sending mail for user, say,"

That's a little vague.  Our email domain includes as a TXT record.  If I query the TXT value for, I see it resolves to {v=spf1 exists:%{i} -all}.  Given the information I'm working with, what IP or CIDR range can I resolve this down to?
@DrDave - Yes I assume an organization as large as SF is getting it right as well which is why I want to fully understand what is happening.  In my example, I would actually need to gather an email sent by SF to gather the sending IP which I could then plug into <IP>, correct?  Would this be an A record?  PTR maybe?
Avatar of DrDave242
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thank you both.
Avatar of noci

the %{i} will cause a lot less addresses that need to be mentioned in includes.. (there are a limited amount of includes)
Appearantly SalesForce has a lot of address that cannot easily be captured in a few network ranges.