Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Part of my SPF record contains:

I'm still getting soft fail because the actual e-mail is delivered by the following

Received: from ( []

Which has a completely different IP from However I don't want to put in because it might be dynamic. Is there some equivalent of * that I can use in the record

share|improve this question
up vote 14 down vote accepted

No you can't. That is not the correct SPF record, and it is not the correct address of Google's SPF record. Anyone with the control of a reverse DNS domain can make any IP have any name he/she wants, like "", "", etc. Allowing reverse matches at all would be very wrong.

The "include" feature of SPF works differently. It does a direct DNS resolution on the given name, and then processes the records that comes from that response. The correct SPF record for Google's e-mail servers is:

v=spf1 ~all

The match is done by IP address from the results returned by a TXT DNS query to Should Google ever change the IP address of their mail servers, this record should be changed too. As of today, a query to that record returns:

~% dig +short txt
"v=spf1 ip4: ip4: ip4:
ip4: ip4: ip4: ip4:
ip4: ip4: ip4: ?all"

Note that the address you are seeing,, is included above, in So, if your SPF record is configured correctly, it should PASS.

More information on Google Apps Help.

share|improve this answer
What does the ~ before all do? I know - (strict) and + permissive, but haven't seen that one. – Johan Mar 1 at 19:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.