Hi,

I have written a greylist filter greylist.py for the python filter
framework pythonfilter (Gordon Messner) [3].

It is based on the pythonfilter script greylist.py from Mik [1] and
comeagain.py from Gordon [2].



The improvements/changes to greylist.py in detail:

- There are now whitelists (python anydbm dbs) for domain names, ip
  addresses and sender/receiver addresses. The sender/receiver whitelist
  consists of hashed (MD5) email addresses. With the script
  pythonfilter_importmailaddresses.py you can import e.g. the mail
  addresses of your customer database to have them auto-whitelisted.

- Envelope sender and receiver addresses are now converted to lowercase
  before processing to handle different notations of mail addresses.

- To calculate the triplet (IP,sender,receiver) hash value, the class C
  net of the sender IP is used instead of the hole IP. This measures
  takes mail server pools into account where subsequent delivery
  attempts may orgin from different IP addresses. (Only IPv4 addresses
  are handled this way.)

- Store two timestamps per greylist entry instead of one: the time when
  the entry was created (firstTimestamp) and the time when the last
  successfull delivery has taken place (lastTimestamp). So which each
  successfull delivery lastTimestamp is updated.

- There are also two different TTL-values for the entries:
  _sendersPassedTTL and _sendersNotPassedTTL. Entries whose
  lastTimestamp is older than _sendersPassedTTL (default 36 days) are
  deleted out of the list. Entries which are not "authenticated" (no
  second delivery attempt has taken place) are deleted after
  _sendersNotPassedTTL (default 24h). The reason is to keep list small
  and not fill up the database with spam entries. 

- If the used db module provides the sync method use it every
  _sendersPurgeInterval (default now 2 hours) to have the hash db
  _senders saved to disk regulary. I experienced problems with longer
  purge intervals (deleted entries were still in the database after
  sync), thats why I choosed 2 hours instead of 12.


For more information please see
http://www.georglutz.de/wiki/CourierServer (entry "Greylisting").



[1] http://www.freenux.org/~mm/wordpress/?p=6
[2] http://phantom.dragonsdawn.net/~gordon/courier-patches/courier-pythonfilter
[3] http://www.georglutz.de/wiki/CourierServer

-- 
Georg

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to