[Greylist-users] greylist lib in C?

William Blunn bill--greylist at blunn.org
Wed Aug 25 02:56:06 PDT 2004


> Before I start writing one, has anyone written a generic library to
> handle greylisting actions, written in C (not C++)?  (Or any other C
> implementation that I could raid for good bits :-) )

Yes.  The Bagley system is written in C++.

http://sourceforge.net/projects/bagley/

It was originally based on Martin Dempsey's system, but all the original
code has been replaced.

Improvements in particular made:

* String handling in Bagley will work with arbitrary-length strings, and
  uses a string library with a carefully designed API to prevent buffer
  overruns & NULL-pointer dereferences.

* Database design reworked to use hash indexes

* The greylisting function has been split out into a function with a
  defined generic API.  There are then wrapper functions for:
  
  (a) standalone binary usage
  
  (b) Exim local_scan() usage (not recommended because of well-known
      limitations)
      
* Explicit handling of the case where there are multiple recipients and
  they have different greylisting results.  However this code is now
  considered redundant as the preferred method of greylisting is to do a
  greylisting call for each RCPT, which makes the issue go away.

Bill


More information about the Greylist-users mailing list