Link to home
Start Free TrialLog in
Avatar of Jason Crawford
Jason CrawfordFlag for United States of America

asked on

{v=spf1 exists:%{i}._spf.mta.salesforce.com -all}

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

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

Name                                     Type   TTL   Section    Strings
----                                     ----   ---   -------    -------
_spf.salesforce.com                      TXT    2982  Answer     {v=spf1
                                                                 exists:%{i}._spf.mta.salesforce.com -all}

Open in new window

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

        "v=spf1 include:_spf.google.com include:_spf.salesforce.com  include:spf.mandrillapp.com exists:%{i}._spf.corp.salesforce.com ~all"
>

Open in new window


I believe you're asking about
exists:%{i}

This is one of types define a verification mechanism

ip4 - use IP Version 4 addresses, for example, 192.168.3.0 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::
http://www.zytrax.com/books/dns/ch9/spf.html
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 1.2.3.4, then %{i}._spf.mta.salesforce.com would be 1.2.3.4._spf.mta.salesforce.com. 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

ASKER

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

"sender-ip The IP of SMTP server sending mail for user, say, info@example.com"

That's a little vague.  Our email domain includes _spf.salesforce.com as a TXT record.  If I query the TXT value for _spf.salesforce.com, I see it resolves to {v=spf1 exists:%{i}._spf.mta.salesforce.com -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>._spf.mta.salesforce.com, correct?  Would this be an A record?  PTR maybe?
ASKER CERTIFIED SOLUTION
Avatar of DrDave242
DrDave242
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you both.
Avatar of noci
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.