How do I include host IP in SPF record for Gmail for Domains?

  • Problem
  • Updated 5 years ago
I have Gmail for Domains. I have set up my SPF record as the following:

mydomain.com. IN TXT "v=spf1 include:aspmx.googlemail.com -all

but discovered the contact form on my site is not sending me form results. So I may be missing prospective clients requests for my services.

How do I modify the SPF record to include my host IP account in the SPF record?
Photo of redcrew

redcrew

  • 3 Posts
  • 0 Reply Likes
  • frustrated

Posted 7 years ago

  • 5
Photo of redcrew

redcrew

  • 3 Posts
  • 0 Reply Likes
Anyone from Google around? According to the top of this page, there have been three employees from Google listening and participating since 9 hours ago when I posted this message.
Photo of Josh Fraser

Josh Fraser

  • 1 Post
  • 2 Reply Likes
the -all is a hard fail, which basically tells any email client to reject any email that doesn't come from Google. You can change that to ~all to tell email clients to be a little less harsh. The better solution is to just include you IP address in the SPF record:

v=spf1 a mx ip4:X.X.X.X include:aspmx.googlemail.com -all

It's that easy!
Photo of redcrew

redcrew

  • 3 Posts
  • 0 Reply Likes
I found the solution earlier with the following SPF record:

v=spf1 a mx include:aspmx.googlemail.com -all

the "a mx" allows my web based contact form to work, without having to add the IP address
Photo of

  • 2 Posts
  • 1 Reply Like
You can simpify it by removing "mx":

v=spf1 a include:aspmx.googlemail.com -all

Chears,
http://www.riaguy.com/books/
Photo of

  • 2 Posts
  • 1 Reply Like
Oh, and also replace -all with ~all

v=spf1 a include:aspmx.googlemail.com ~all
Photo of michael.d.mcginnis

michael.d.mcginnis

  • 1 Post
  • 0 Reply Likes
Google Apps Admin Help recommends:
v=spf1 include:_spf.google.com ~all
Photo of Cocoa Wood

Cocoa Wood

  • 1 Post
  • 0 Reply Likes
When you are using: v=spf1 include:aspmx.googlemail.com -all

Email generated on your server is not going through aspmx.googlemail.com servers.
-all means every other messages should fail.

The Fix is change to:

v=spf1 a mx include:aspmx.googlemail.com ~all



-Chris