added some comments
authorheiko
Wed, 18 Mar 2015 14:50:22 +0000
changeset 52 23160db926d4
parent 51 fa806b8232d4
child 53 86d6f7fdeb7e
added some comments
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 <hs@schlittermann.de>
+# © 2006,2007,2008 Heiko Schlittermann <hs@schlittermann.de>
 # $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 <dwmw2@infradead.org>"
+# 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
+# <KEY> <$sender_host_address> <$sender_helo_name>
+# (Where <KEY> 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";