Postgrey - the Postfix Greylisting Implementation

t

The installation process is really simple. All you need is the package named postgrey, which can be installed using the following command.

sudo aptitude install postgrey

Now, you can optionally configure the postgrey daemon using the file /etc/default/postgrey. I am using the default values (did not touch the file) and everything runs fine as it seems. By the way, right after installation, the server should be up and running alreay. Do not forget to restart it, after re-configuration (/etc/init.d/postgrey restart).

Now we need to tell postfix to use postgrey accordingly. Therefore, you need to change the configuration file to the following lines.
/etc/postfix/main.cf:

smtpd_recipient_restrictions = permit_sasl_authenticated,
                               permit_mynetworks,
                               reject_unauth_destination,
                               check_policy_service inet:127.0.0.1:60000

You should check the connection address and port (maybe using ps ax | grep postgrey) and change it accordingly - although, if you are using the default setup, it should be the very same setting. Save and close the file and reload the mail server configuration by invoking

sudo postfix reload

That’s it. The SPAM flow should be ended :)
Cheers, iss

Flattr: