[Mimedefang] Timeouts when filter-sender is employed

alan premselaar alien at 12inch.com
Wed Jun 15 19:38:02 EDT 2005


Dirk the Daring wrote:
...snip...

> 
> ##########
> sub filter_sender {
>     my($sender, $hostip, $hostname, $helo) = @_;
> 
>     # Can't be "psicorps.org" unless it's one of our IP's.
>     if ($helo =~ /(^|\.)psicorps\.org$/i) {
>         if ($hostip ne "127.0.0.1" and $hostip ne "209.170.141.XXX" and
>             $hostip ne "209.170.141.XXX" and $hostip ne "209.170.141.103") and
               				the ) before the and in the above line is probably 
what's causing your problem. (non-matching parens) 
                                                      									
>             $hostip ne "209.170.141.XXX" and $hostip ne "209.170.141.XXX") {
>             syslog('info', "MIMEDefang rejected a connection where Host $hostip said HELO $helo");
>             return(0, "Connection Rejected: $hostip is not authorized to use $helo for identification");

I'm sure it's been recommended that instead of returning 0 or 1 etc, you 
should return 'CONTINUE' or 'REJECT' etc. it shouldn't cause filter 
failures however.

>         }
>     }
>     return (1, "OK");
> }
> ##########
> 

when in doubt, running mimedefang.pl -test on your filter will show you 
most problems with your filter before running it live.

perl -c should show you any serious compilation errors

HTH

Alan



More information about the MIMEDefang mailing list