msgbartop
MAC OS X, Linux, Windows and other IT Tips and Tricks
msgbarbottom

07 May 15 Anti-SPAM mail filtering using SPF on Debian Wheezy

Install the package:
apt-get install postfix-policyd-spf-perl
Add this line to /etc/postfix/main.cf:
policy-spf_time_limit = 3600s
Add the following lines to /etc/postfix/master.cf:
policy-spf unix - n n - - spawn
user=policyd-spf argv=/usr/sbin/postfix-policyd-spf-perl

In /etc/postfix/main.cf, find the smtpd_recipient_restrictions section, and, immediately after permit_mynetworks (and permit_sasl_authenticated, if you’re using that), add:
check_policy_service unix:private/policy-spf,
Restart Postfix and check your logs to see if everything is working properly.
tail -f /var/log/mail.log

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: