Who uses Postgrey as part of anti-SPAM complex must periodically reset the database that the application has generated. This is because by the time server many spammers are able to maintain long periods of operation without anything or anyone capable of stopping them - making them end up in one of the blacklist of reference, for example.

The result is that more and more servers spammers end up in some big database of the combinations considered by our trustable Postgrey, invalidandone facto effectiveness. To avoid scenarios like this there is a brutal but effective method: Postgery completely reset the database and its lock file, bringing it back to the original situation.

Here's how:

  1. stop the daemon Postgrey
  2. delete the directory / var / lib / postgrey (I highly recommend renaming)
  3. create a / var / lib / postgrey empty
  4. restart Postgrey

In other words, one must proceed as follows:

# /etc/init.d/postgrey stop
# cd /var/lib
# mv postgrey postgrey_OLD
# mkdir postgrey
# chown -R postgrey:postgrey postgrey
# /etc/init.d/postgrey start

These instructions are for Debian GNU / Linux - my reference distribution - but they work for almost all other available distributions. Contraindications? None, except that the reset mechanism will then be taken into consideration all new messages, even those from the actual server trustable - that already had their triplets in db Postgrey - causing minor delays in delivery of mail. For this advice to reset only a couple of times a year.

Share this content:
  • del.icio.us
  • Google Bookmarks
  • Digg
  • Facebook
  • Technorati
  • MySpace
  • Twitter