Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having an issue with Postfix and SPF that I can't seem to figure out. I have installed SPF for Postfix using the guide on this link (postfix-policyd-spf-perl).

However, I don't want Postfix or Mail::SPF to "reject" mail if it fails. All I want it to do is add the Authentication result to the emails header like it normally does. I have tried to find a config file for postfix-policyd-spf-perl but I can't seem to locate anything.

Below is an example of the rejection message: #< #5.7.1 smtp; 550 5.7.1
<>: Recipient address rejected: Please see;;;r=MAILER> 

Please help!


share|improve this question

as far as I know, you cannot just disable spf partly, you either use it or you don't.

It's the owner of the SPF/TXT record that can choose to soft- or hardfail by using ~ or - in the dns record.

However, you could just disable spf so it won't be used by your postfix. Depending on your setup it's probably done by disabling / removing check_policy_service unix:private/policy from the smtpd_recipient_restrictions in postfix

share|improve this answer
it's also possible to perlscript some function that checks the SPF record and adapts spamassassin score if you want. – user264843 Apr 3 '14 at 8:17
In my case (Ubuntu 16.04), the entry in smtpd_recipient_restrictions was called check_policy_service unix:private/spfcheck – Candid Dauth May 11 at 18:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.