Implementing greylisting with Exim

Due to the increasing amount of annoying SPAM mails there exist many techniques to reduce that junk. One very successful approach is called “Greylisting“.

Technorati Tags: ,

The basic idea behind it is to deny an incoming mail with a temporary error code in the first place. But at the same time the mail server (MTA) saves the ip address and sender domain of the incoming mail.

Every ordinary (non-spammmer) mail server will try to resend the deferred mail after some minutes. This time the mail (and all the following) will be accepted as the MTA knows that this server already tried to deliver this mail. A spammer often does not try to resend a mail after it was not accepted. The time and resources needed for this would not be very economic for a spammer.

Unfortunately, there are also some disadvantages:
One mayor tradeoff is that some mails will be delayed a few minutes (dependend of configuration) but this should not be a very big problem for most people. Another problem are servers which aren’t correctly configured and won’t try to resend a mail. So the sender gets an error that the mail could not be delivered. Fortunately most servers are set up correctly.

A full design whitepaper of Greylisting can be found here.

There are many implementations for most MTAs and also for Exim which I use on my server. All you need is a database Exim can use to store its Greylisting information. A simple implementation with Exim and MySQL can be found here. If you prefer PostgreSQL take a look at this website.

I reconfigured my Exim installation a few days ago and - yes, email is fun again. :)

0 Responses to “Implementing greylisting with Exim”


  1. No Comments

Leave a Reply