[Greylist-users] Bagley: A standalone binary greylister for Exim 4

William Blunn bill--greylist at tao-group.com
Mon Mar 1 12:15:27 PST 2004


I've just finished the first cut of a standalone binary program (written
in C++) which implements greylisting for Exim 4.

It is a standalone program so no recompilation of Exim is required.

I am calling it Bagley - Bill's GreyLister for Exim.

I started with Martin Dempsey's code but it didn't work in quite the way
I wanted it.  So I hacked on it, eventually completely re-writing it
until I had a local_scan system that worked the way I wanted.
Investigating some more I found out about Exim 4's ACL hook mechanism
used by Roman Festchook's perl implementation, and realised that this
would give me a better solution.

Using an ACL hook means that I can (temporarily) reject messages before
receiving the message DATA, whereas local_scan only works after the
message DATA has already been received.

Also it is much more convenient to use a binary packaged Exim 4 than
having to build your own.

So I re-factored my implementation to separate out the greylisting core,
then made a shim to make it work out of an ACL hook.  (In fact I
started by making a shim for local_scan operation, so now it will work
either way.)

The backend database is MySQL.  I have optimised it to work just
fine on MySQL 3.23.49 (Debian Woody version).

Through the Exim 4 ACLs, it can signal Accept, Reject, or
Temporary-reject.

I have a config file mechanism so that the greylisting time, database
connect parameters, and logging parameters can be adjusted easily.

On a Pentium III 1GHz, the elapsed time in the program seems to be
running at about 40 milliseconds per message.

Extract from log file:

2004-03-01T19:40:56Z res=tempreject elap=0.036927 h=68.203.136.168 s=maigarza_ml at mdnet.com.br r={koan3 at sseyo.com}
2004-03-01T19:41:07Z res=tempreject elap=0.035108 h=66.63.163.168 s=j994156f at yihmarketers.com r={mcl at sseyo.com}
2004-03-01T19:41:09Z res=tempreject elap=0.044619 h=68.249.239.227 s=karla_hendrix_iw at skinup.co.uk r={anlink at sseyo.com}

"elap" shows the processing time in seconds.

I haven't packaged it up yet or put it up on a web site.

I was just wondering if anyone would be interested.

Bill

The contents of this e-mail and any attachments are confidential and may
be legally privileged. If you have received this e-mail and you are not
a named addressee, please inform us as soon as possible on
+44 118 901 2999 and then delete the e-mail from your system. If you are
not a named addressee you must not copy, use, disclose, distribute,
print or rely on this e-mail. Any views expressed in this e-mail or any
attachments may not necessarily reflect those of Tao's management.
Although we routinely screen for viruses, addressees should scan this
e-mail and any attachments for viruses. Tao makes no representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that for the protection of our business, we may monitor and
read e-mails sent to and from our server(s).


More information about the Greylist-users mailing list