darxus: (Default)
darxus ([personal profile] darxus) wrote2005-02-02 05:57 pm
Entry tags:

[geek] greylisting with postfix on debian stable

Very effective way to block spam which I hadn't gotten around to setting up until now. Very easy to set up.

Add to your /etc/apt/sources.list:
deb http://www.backports.org/debian/ woody postfix
deb http://www.backports.org/debian/ woody postgrey


Run:
apt-get update
apt-get -u dist-upgrade # will upgrade postfix
apt-get install postgrey


Modify /etc/postfix/main.cf

smtpd_recipient_restrictions =
       permit_mynetworks
       reject_unauth_destination
       check_policy_service inet:127.0.0.1:60000


That section and the last two lines in it are required. You're likely to also want permit_mynetworks so localhost can always send outgoing mail (I needed it for mailman to be able to send).

Check back later for statistics.

Update: I've gotten no spam in the 3 hours since I set this up. That's impressive.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting