On 2006-07-09 Andreas Metzler <[EMAIL PROTECTED]> wrote:
[...]
> *Almost* because afaict exim4 expects the daemon to close the
> connection after sending its response. postgrey keeps the connecton
> open and exim complains about "socket read timed out". It would be
> nice if there was a switch for postgrey to change this.

After googling I found that somebody else had already had the same
idea http://blog.mombe.org/systems/greylistexim.htm and even produced
a patch (against 1.24) attached for your convenience.
thanks, cu andreas
-- 
The 'Galactic Cleaning' policy undertaken by Emperor Zhark is a personal
vision of the emperor's, and its inclusion in this work does not constitute
tacit approval by the author or the publisher for any such projects,
howsoever undertaken.                                (c) Jasper Ffforde
--- postgrey.orig       Wed Mar 22 15:05:50 2006
+++ postgrey    Wed Mar 22 15:40:24 2006
@@ -384,6 +384,7 @@
         'lookup-by-subnet', 'lookup-by-host', 'auto-whitelist-clients:s', 
         'whitelist-clients=s@', 'whitelist-recipients=s@',
         'retry-window=s', 'greylist-action=s', 'greylist-text=s', 'privacy',
+        'noreuse|no-reuse|r',
     ) or exit(1);
     # note: lookup-by-subnet can be given for compatibility, but it is default
     # so do not do nothing with it...
@@ -461,6 +462,7 @@
             whitelist_recipients_files => $opt{'whitelist-recipients'} ||
                 [ '/usr/local/etc/postfix/postgrey_whitelist_recipients' ],
             privacy => defined $opt{'privacy'},
+            no_reuse => defined $opt{'noreuse'},
         },
     }, 'postgrey';
 
@@ -579,6 +581,11 @@
                 }
                 # give answer
                 print $fh "action=$action\n\n";
+                # close the filehandle if --no-reuse is set
+                if ($self->{net_server}->{postgrey}{no_reuse}) {
+                    close($fh);
+                    last;
+                } 
             }
             $self->{postgrey_attr} = {};
         }
@@ -628,6 +635,7 @@
                                   whitelisted (turned on by default with value 
5)
                                   specify N=0 to disable.
      --privacy           store data using one-way hash functions
+     --no-reuse          don't reuse a socket for more than one query (exim 
compatible)
 
  Note that the --whitelist-x options can be specified multiple times,
  and that per default /usr/local/etc/postfix/postgrey_whitelist_clients.local 
is

Reply via email to