[Mimedefang] Re: Timeouts when filter-sender is employed (various)

Dirk the Daring dirk at psicorps.org
Thu Jun 16 17:10:54 EDT 2005


>From: alan premselaar <alien at 12inch.com>
>
>Dirk the Daring wrote:
>>     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)

   Thank you, Alan!! That was exactly the problem. I'd stared at that
code for hours, and even rewrote it once, and hadn't caught that
problem.

>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

   Yes, looking into the mimedefang-filter man page, I see that. I got
the code I used from the Wiki, so I suppose the Wiki pages with the
example filters should be updated.

>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

   I've added them to my toolbox. Thanks.

>From: "James Ebright" <jebright at esisnet.com>
>
>OK, I assume the XXX you have in there are actually filled in with real

   Yes, I merely obscured the addresses of the hosts that don't talk
directly to the 'Net.

>Simple enough to do, something like:
>if (($helo =~ /(^|\.)psicorps\.org$/i) || ($helo =~
>/(^|\[)209\.170\.141\.103\]$/i)) {

   What if the address is *not* enclosed in [ ]s? Does one merely delete
the [ and ] from that test, or is it more complex than that?

>Also, I think you have your reject and ok flipped (ok is 0 and reject is 1 I
>think), returning the value is depreciated anyway, us the constants like so:

   Seems to be working fine (I tested it by telnetting in from an
external host), and as I noted above, I got the snippet from the Wiki.

>From: "David F. Skoll" <dfs at roaringpenguin.com>
>
>It's unlikely to be a timeout.  Ensure that the "-l" option is being supplied
>to mimedefang-multiplexor and check your logs for error messages.

   Yes, the -l option is part of the invocation.

   Thank you, Alan, James and David. MIMEDefang is working well right
now. Just basic filtering in place, but I want to add more.

Dirk



More information about the MIMEDefang mailing list