Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th April 2013, 11:56
garson garson is offline
Junior Member
 
Join Date: Nov 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default SPF in Postfix not working

Hi.
I have Ubuntu 11.04 with Postfix+Dovecot (virtual users).
I have implemented SPF in Postfix, according to this How to:
http://www.howtoforge.com/postfix_spf

I've downloaded latest postfix-policyd-spf-perl (2.010), set everything up, and tested it, as in How to.
That worked fine, and I can see postfix/policy-spf entries in syslog.
But when receiving emails, nothing happens, emails are received without SPF check. In syslog there aren't any postfix/policy-spf entries, everything as there is not postfix-policyd-spf-perl.
What could be the problem?

Thanks in advance,
Vlad

Last edited by garson; 17th April 2013 at 12:06.
Reply With Quote
Sponsored Links
  #2  
Old 17th April 2013, 16:56
markc markc is offline
Member
 
Join Date: Dec 2012
Posts: 56
Thanks: 6
Thanked 9 Times in 9 Posts
Default

Have you checked incoming mail from domains that actually contain SPF DNS records? It won't work for all mail unless the senders domain has an SPF record and they do, or not, send out via the authorized mailserver IP. Even so, the "TXT" record (usually TXT, could be SPF) has to end with "-all" to force a hard fail.
Reply With Quote
  #3  
Old 17th April 2013, 17:04
garson garson is offline
Junior Member
 
Join Date: Nov 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, I've tried to send email as someuser@somedomain.com from smtp server in my company, that somedomain.com has SPF record (checked with online SPF tool), and I receive that email.
When I send email to my gmail account, I get it, but with softfail.
Reply With Quote
  #4  
Old 17th April 2013, 17:54
markc markc is offline
Member
 
Join Date: Dec 2012
Posts: 56
Thanks: 6
Thanked 9 Times in 9 Posts
Default

That could be the issue, if the end of the SPF record is not "-all" (hardfail) then the email will still (probably) be delivered. A softfail is meant to be picked up in the next layer of mail software after SMTP delivery. It's usually then managed by seive/maildrop filtering or end user client programs.

I could be way off base but it would be worth checking from a domain with SPF hardfail set, and then maybe postfix will drop it at the SMTP level. I could set up a test case if you are desperate.
Reply With Quote
  #5  
Old 17th April 2013, 22:06
garson garson is offline
Junior Member
 
Join Date: Nov 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Thanks, markc.
But email received by gmail has Received-SPF: softfail, and one received by my email server does not.
I used same data (sender/receiver etc.) for testing (perl /usr/lib/postfix/policyd-spf-perl ) and for sending real email. When testing there were entries in syslog.
That is why I think that SPF check is not working at all (not triggered).
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple postfix errors iandoug Server Operation 4 6th February 2013 22:40
Postfix: can send emails outside, none received daseagle Server Operation 9 11th October 2011 12:03
Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? tarasbuljba HOWTO-Related Questions 33 28th May 2010 14:33
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 09:40
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47


All times are GMT +2. The time now is 00:25.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.