# HG changeset patch # User heiko # Date 1426690222 0 # Node ID 23160db926d46c46a5452b5e925f786366c20fed # Parent fa806b8232d4c1f603dbd6d012379d60a834a7ff added some comments diff -r fa806b8232d4 -r 23160db926d4 exim-exigrey.pl --- a/exim-exigrey.pl Mon Jan 21 11:43:40 2008 +0000 +++ b/exim-exigrey.pl Wed Mar 18 14:50:22 2015 +0000 @@ -1,4 +1,4 @@ -# © 2006,2007 Heiko Schlittermann +# © 2006,2007,2008 Heiko Schlittermann # $Id$ # $URL$ @@ -30,10 +30,13 @@ sub getDefault() { %DEFAULT } # Usage: -# ${perl{unseen}{$sender_host_address}} -# ${perl{unseen}{$sender_host_address}{600}} -# ${perl{unseen}{$sender_host_address}{600}{seen}} -# ${perl{unseen}{$sender_host_address}{600}{$spool_directory/grey/seen}} +# ${perl{unseen}{KEY}} +# ${perl{unseen}{KEY}{600}} +# ${perl{unseen}{KEY}{600}{seen}} +# ${perl{unseen}{KEY}{600}{$spool_directory/grey/seen}} +# +# With KEY being something to identify the second delivery attempt +# (I recommend using $sender_address+$local_part@$domain) # # record structure: key: item\0 # value: timestamp(creation) timestamp(usage)\0 @@ -73,6 +76,30 @@ return $rc; } +# According to a thought from "David Woodhouse " +# on exim-users@exim.org (Thu, 08 May 2008 13:10:21 +0100, +# Message-Id: <1210248621.25560.1088.camel@pmac.infradead.org>) we +# should have the ability to "auto whitelist" hosts which are known +# for retries, because there is no benefit in greylisting them. +# +# Most safe approach would be something based on message id. +# If we see the message id a second time it indicates successful retry. +# But we do not see the message id the first time we reject the message. + +# This function has to be called twice per message delivery attempt +# <$sender_host_address> <$sender_helo_name> +# (Where is something like <$sender_address>+<$local_part@$domain> +# If we see the same message a second time (same message means here: +# same greylist criteria + +sub autowhite { +} + +sub known { +} + + + sub white($;$) { unseen($_[0], 0, defined $_[1] ? $_[1] : $DEFAULT{white}); return "yes";