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.

[identity profile] cyron-lj.livejournal.com 2005-02-03 03:23 am (UTC)(link)
I need to setup some spam filtering...
Are you getting other e-mail you should get?
Cy.

[identity profile] darxus.livejournal.com 2005-02-03 02:10 pm (UTC)(link)
Yup.

[identity profile] plug-them-in.livejournal.com 2005-02-03 01:47 pm (UTC)(link)
awesome, thanks darxus!

[identity profile] fuzcat.livejournal.com 2005-02-03 05:30 pm (UTC)(link)
You have great timing. Mail set up is something I am hoping to get to this weekend or next.