Link to home
Start Free TrialLog in
Avatar of mchad65
mchad65

asked on

What is the proper format for a simple SPF entry on a DNS record.

I am trying to troubleshoot an email delivery issue, and I think I have tracked it down to our SPF record being out of date.  Right now, as below, our SPF record has our domain name, the external ip address that all internal servers appear to be coming from (due to NAT) and the names of three servers that sent emails (from applications, not our email server).

domain.com.             IN      TXT     "v=spf1 ip4:XXX.XXX.XXX.XXX mx ptr a:server1 a:server2 a:server3 ~all"

After some review, I am wondering if I need to use the FQDN of the servers and also do I need to use the FQND of the mail server (which I thought was covered by the "mx" entry)

In other words:

domain.com.             IN      TXT     "v=spf1 ip4:XXX.XXX.XXX.XXX mx ptr a:exchange.domain.co, a:server2.domain.com a:server3.domain.com ~all"

Thanks
Avatar of newborn1281
newborn1281
Flag of United States of America image

Mail is being delivered by MX records. Check your MX record
run on any computer
nslookup
set type=MX
yourdomain.com

and see if respond is current
Avatar of omarfarid
The MX record is used for incoming messages.

Please see the link below:

http://www.zytrax.com/books/dns/ch9/spf.html
Avatar of mchad65
mchad65

ASKER

Sorry, I was unclear.  Delivery of email to our domain is fine.  The delivery I was referring to is to an external domain from our mail server.  So it is a sending problem, (delivery to the remote domain)

Sorry for the confusion
I checked some websites for SPF record as far as i see they use a:computername.domain.com
fragment for example.net
$ORIGIN example.net.
@            IN TXT "v=spf1 a:mail.example.com -all"
; will use a single A query for mail.example.com

from this I understand you will need A record in DNS for exchange.domain.com
Avatar of mchad65

ASKER

So I am ok with changing the servers to FQDN's, but do I need the ip4: statement?  So if I change the below from:
domain.com.   IN TXT     "v=spf1 ip4:XXX.XXX.XXX.XXX mx ptr a:server1 a:server2 a:server3 ~all"
to:
domain.com.   IN TXT     "v=spf1 mx ptr a:exchange.domain.com a:server2.domain.com a:server3.domain.com ~all"

Should that be ok?
It is recommended to have PTR records for your outgoing mail servers since without them connections can be dropped.
But in reality why do you need SPF record in our environment we use Firewall to block traffic on port 25 for all except exchange.
Avatar of mchad65

ASKER

Or do I leave off the mx ptr as in:

domain.com.   IN TXT     "v=spf1 a:exchange.domain.com a:server2.domain.com a:server3.domain.com ~all"
ASKER CERTIFIED SOLUTION
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates 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
Avatar of mchad65

ASKER

"But in reality why do you need SPF record in our environment we use Firewall to block traffic on port 25 for all except exchange."

Because part of our business is to send bulk emails to clients inviting their employees to our websites, and this helps preventing us from being classified as spam.
SOLUTION
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