How to setup postgrey
Postgrey is a postifx policy server which utilizes greylisting, a very simple yet highly effective (for now) way to stop spam.
- Download files..
wget postgrey-1.24.tar.gz
- Untar .. and read the README file...
tar -xzvf postgrey-1.24.tar.gz
more README
^c
less README
q
perldoc postgrey
- Follow Instructions!
useradd postgrey
.. <copy init script from someone else..>
/etc/rc.d/init.d/postgrey start
- Swear and install needed perl modules which were listed in the documentation
- Restart server.. and send a test email to see if it all works
- Edit configuration file for some actual parameters...
OPTIONS="--unix=/tmp/postgrey.sock --lookup-by-subnet \
--user=postgrey --group=postgrey --daemonize \
--greylist-text='Greylisted for %s seconds (see http://www.unix-girl.com/greylist.html)'"
- Restart server.. and send a test email to see if it all works
- Discover you forgot to upgrade postfix to something that actually supports server policy (2.2)
- Upgrade postfix
- Restart server, send test email to see if it all works..
- Discover some of your configuration no longer works with the new version of postfix and you're now bouncing all emails.. change config
- Restart server, send test email to see if it all works
- It works! Enjoy a lot less spam
I love how easy working with postfix is (in reality all that took only about 30min - including the time to bitch - and at a maximum 5 swears). My current spam level went from about a 100 a day (before spamassassin) to 1 or 2 a week.