• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

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
0
mchad65
Asked:
mchad65
  • 5
  • 4
  • 3
2 Solutions
 
newborn1281Commented:
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
0
 
omarfaridCommented:
The MX record is used for incoming messages.

Please see the link below:

http://www.zytrax.com/books/dns/ch9/spf.html
0
 
mchad65Author Commented:
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
0
Free tool for managing users' photos in Office 365

Easily upload multiple users’ photos to Office 365. Manage them with an intuitive GUI and use handy built-in cropping and resizing options. Link photos with users based on Azure AD attributes. Free tool!

 
newborn1281Commented:
I checked some websites for SPF record as far as i see they use a:computername.domain.com
0
 
newborn1281Commented:
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
0
 
mchad65Author Commented:
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?
0
 
omarfaridCommented:
It is recommended to have PTR records for your outgoing mail servers since without them connections can be dropped.
0
 
newborn1281Commented:
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.
0
 
mchad65Author Commented:
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"
0
 
omarfaridCommented:
It should be ok.
0
 
mchad65Author Commented:
"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.
0
 
newborn1281Commented:
should be ok as long as you have ptr and a for your servers
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

  • 5
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now