postfix with SPF (Sender Policy Framework) 1


To prevent faked sender-adresses i recommend to use Sender Policy Framework (see www.openspf.org/Introduction).

You can easily add the SPF-Modul from openspf.org to postfix.

You need these three perl-modules

Mail::SPF
Net::DNS::Resolver::Programmable
NetAddr::IP

After installing the requied modules, get the SPF-modul from here. Extract the archiv and copy postfix-policyd-spf-perl to /usr/lib/postfix kopiert.

Add to postfix´ master.cf the follwing line (the spaces in the second line are recommended):

policy unix - n n - - spawn
       user=nobody argv=/usr/bin/perl /usr/lib/postfix/policyd-spf-perl

Extend in the main.cf smtpd_recipient_restrictions with

check_policy_service unix:private/policy

That´s it. Restart postfix and the SPF-Check is enabled.


Leave a comment

Your email address will not be published. Required fields are marked *

One thought on “postfix with SPF (Sender Policy Framework)