-1

I need to be able to receive emails from my php webform on my website, I use Google Apps for the mail recipient and my website is hosted with Godaddy. I receive email from other places and I have looked and I think the problem is that the web sever thinks they are 'local' messages. In addition to this I also want to allow a site called bookerville to send messages from my site on my behalf. They provided me with the follow SPF code...

v=spf1 include:bookerville.com ?all

Some one set up the current SPF record which seems to be invalid which is (i don't think the ip4 bit is correct as I beleive it needs the sever ip address after it? Also I read on another thread that the ip4 bit isn't required???:

v=spf1 mx ip4:v=spf1 include:bookerville.com ?all include:secureserver.net ~all

I had a look around the web and on here and this seems to be the closest solution although I don't know much about Mx and SPF records so feeling out of my depth.

v=spf1 include:_spf.google.com a a:abc.example.org a:xyz.example.org -all

. This says, include Google's SPF record (which will allow all their mail servers to send mail on behalf of your domain), and allow anything in this domain which has an A record, and specifically allow 2 other hosts by verifying their A records. Fail everything else.

https://stackoverflow.com/questions/11441924/setup-spf-record-to-allow-sending-email-from-google-apps-and-bluehost/11442044#11442044

Lets say my website is www.example.com. Can someone provide me with a suitable SPF text to include the bookerville code (ABOVE) and also any code required for google and which will allow for php form mail to come through??

Thanks in advance

1 Answers1

1
v=spf1 include:_spf.google.com include:bookerville.com a -all

Breakdown:

  • include:_spf.google.com: Parse the SPF record for _spf.google.com as example.com's own
  • include:bookerville.com: Parse the SPF record for bookersville.com as example.com's own
  • a: The IP address example.com resolves to (its A record in DNS thus) is permitted to send
  • -all: All other senders are considered illegitimate

This will only work correctly under the following conditions:

  • There's a single A record for example.com
  • When you send e-mail via the PHP form, the e-mail is sent from the IP address that the A record of example.com resolves to.

Example 1:

example.com. IN A 192.0.2.1

Webserver sends e-mail with source IP 192.0.2.1 => OK

Example 2:

example.com. IN A 192.0.2.1

Webserver send e-mail with source IP 192.0.2.88 => NOT OK

Tools you can use:

RedShift
  • 197
  • 1
  • 8
  • Thanks for that, its a great help. Will this solve the problem with the php form sending 'local' email, (as it's local the godaddy server manages it locally, rather than sending to google? - Or is that a seperate issue?) – Poiple Shadow Oct 24 '14 at 16:47
  • It'll possibly solve it, but to be sure you'll have to ask GoDaddy, as they know which IP address the e-mail from your PHP form will originate from. – RedShift Oct 24 '14 at 19:48