Solved

spf records

Posted on 2011-09-27
9
874 Views
Last Modified: 2012-05-12
i created an spf record using a wizard but when i test the spf by sending an email to spf-test@openspf.org, i believe the results show that it is not working properly.

"spf-test@openspf.org
mailout02.controlledmail.com #550 5.7.1 <spf-test@openspf.org>: Recipient address rejected: SPF Tests: Mail-From Result="none": Mail From="xxx@simex.ca" HELO name="mail.simex.ca" HELO Result="none" Remote IP="216.191.157.78" ##"

Here is my spf record;
"v=spf1 a mx mx:mail.simex.ca -all"

In the DNS Manager, the zone record type is "TXT" with the subdomain name of "simex.ca"

Please advise.



0
Comment
Question by:jnsimex
  • 5
  • 4
9 Comments
 
LVL 21

Expert Comment

by:Papertrip
ID: 36713140
[root@broken ~]# dig txt simex.ca +short
"mail.simex.ca. 86400 IN TXT v=spf1" "a" "-all"

Open in new window

That is what your TXT record looks like when queried.

It should look like this:
"v=spf1 ip4:216.191.157.78 ~all"

Open in new window


0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36713161
Unless you plan on changing the IP of mail.simex.ca often (probably not), then using the SPF mechanisms "a" and "mx" don't need to be used, all they do is cause another lookup to be performed.  Putting in just the IP of server(s) sending your mail is the best approach.  Also, even if you were to use "a" and/or "mx", you don't have the syntax correct for it in either your example or in the "real" results from my external query.

0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36713213
If you have more than 1 IP you can do either of the following, depending on how many IP's there are (SPF TXT record character limit is 255).

"v=spf1 ip4:216.191.157.78 ip4:1.2.3.4 ip4:5.6.7.8 ~all"

Open in new window

or, if there are too many IP's for 1 record, use CIDR notation
"v=spf1 ip4:216.191.157.78/29 ~all"

Open in new window

0
 

Author Comment

by:jnsimex
ID: 36713236
I went with your idea of using a fixed ip in my spf record.

The dns lookup for my TXT record returned "v=spf1 ip4:216.191.157.78 ~all"

I resent the test email and the results are the same.

"spf-test@openspf.org
mailout02.controlledmail.com #550 5.7.1 <spf-test@openspf.org>: Recipient address rejected: SPF Tests: Mail-From Result="none": Mail From="xxx@simex.ca" HELO name="mail.simex.ca" HELO Result="none" Remote IP="216.191.157.78" ##"


0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 21

Accepted Solution

by:
Papertrip earned 500 total points
ID: 36713270
While you are editing DNS, you should try and make the PTR for mail.simex.ca match the A record:
[root@broken ~]# dig mail.simex.ca +short
216.191.157.78
[root@broken ~]# dig -x 216.191.157.78 +short
157-078.tor.economux.com.

Open in new window


Cool your new record looks great
[root@broken ~]# dig @156.154.70.1 txt simex.ca +short
"v=spf1 ip4:216.191.157.78 ~all"

Open in new window


Your SPF record has a TTL of 7200 -- 2 hours.  You can't rely on test results from the same tool if it looked up your SPF record within the last 2 hours, have to wait for it to expire from their cache.
0
 

Author Comment

by:jnsimex
ID: 36713326
So I created a PTR record for host name mail.simex.ca

78.157.191.216.IN-ADDR.ARPA

Not sure if this correct but in the text box, it said to enter in the IP address in reverse order + ".IN-ADDR.ARPA"

Yes, it looks much better now.

Thanks for your help.
0
 

Author Comment

by:jnsimex
ID: 36717241
Can you explain your logic for using a softfail vs a fail in the SPF?
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36718660
SPF hardfail will break forwarding 100% of the time.  If you are not concerned with people being able to forward emails from your domain, then you can turn on hardfail.   This is an inherent and well-known problem with SPF.  Keep in mind that it is a common practice for users to setup auto-forwards for their mail, say from their vanity domain to their gmail account for example.

How the receiving server treats SPF softfails is completely up to them.  Also how your mail client interprets results in the headers from authentication checks plays a role.  That is one of the problems in the email world -- you can't dictate how everyone will setup (or break) their receiving servers.  Gmail for example will display a warning that SPF softfailed, and that you should be concerned of a potential spoof.

Basically SPF is far from the end-all for mail authentication, it should be used in conjunction with at least DKIM.  I realize now I should have included that in the earlier replies, not sure why I didn't in hindsight.

How you decide to implement it is completely up to you -- even the big guys do things their own way because they take into consideration things like DKIM signatures, ADSP, receiver policies etc etc... all depends on how you want your mail to be treated.

[root@broken ~]# dig txt _spf.google.com +short
"v=spf1 ip4:216.239.32.0/19 ip4:64.233.160.0/19 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:209.85.128.0/17 ip4:66.102.0.0/20 ip4:74.125.0.0/16 ip4:64.18.0.0/20 ip4:207.126.144.0/20 ip4:173.194.0.0/16 ?all"
[root@broken ~]# dig txt hotmail.com +short
"v=spf1 include:spf-a.hotmail.com include:spf-b.hotmail.com include:spf-c.hotmail.com include:spf-d.hotmail.com ~all"
[root@broken ~]# dig txt paypal.com +short
"v=spf1 include:pp._spf.paypal.com include:3rdparty._spf.paypal.com include:3rdparty1._spf.paypal.com include:3rdparty2._spf.paypal.com include:c._spf.ebay.com ~all"
[root@broken ~]# dig txt facebook.com +short
"v=spf1 ip4:69.63.179.25 ip4:69.63.178.128/25 ip4:69.63.184.0/25 ip4:66.220.144.128/25 ip4:66.220.155.0/24 ip4:69.171.232.128/25 ip4:66.220.157.0/25 ip4:69.171.244.0/24 mx -all"

Open in new window

0
 

Author Comment

by:jnsimex
ID: 36718787
Cool man. Thanks for the following up.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you have a multi-homed DNS setup in windows, you can have issues with connectivity to the server that hosts the DNS services (or even member servers of your domain if this same DNS server is a DC). This is because windows registers all of its IPs…
I wrote this article to explain some important DNS concepts that should be known to avoid some typical configuration errors I often see in forums. I assume that what is described here is the typical behavior of Microsoft DNS client. I don't know …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now