On Thu, Apr 23, 2009 at 04:04:58PM +0200, Erik Hensema / HostingXS wrote:
> > "Erik Hensema / HostingXS" <hens...@hostingxs.nl> wrote:
> > > However, in some (rare) cases relays are blocked even though there are
> > > whitelisted and not blacklisted on any blacklist.
> > > I can't see how this can be caused by my filter code.
> >
>         my $ans = relay_is_blacklisted_multi($RelayAddr, 5, $required, 
> \...@dnsbls);
> 
>         my $count = 0;
>         foreach my $domain (keys(%$ans)) {
>                 my $r = $ans->{$domain};
>                 if(ref($r) eq "ARRAY") {
>                         push @dnsbl_positive, $domain;

My guess is: do you forget to clear @dnsbl_positive at the start of the
function? Good practice is to avoid global variables as much as
possible, and to make sure you run your code under "use strict" and "use
warnings" (yes, even in produktion - warnings end up in the maillog
anyway).

Every case I've seen where such unpredictable behaviour was seen, which
could not be (easily) reproduced while testing, was a case of state
variables "leaking" values from one call to the next.

-- 
Jan-Pieter Cornet <joh...@xs4all.nl>
!! Disclamer: The addressee of this email is not the intended recipient. !!
!! This is only a test of the echelon and data retention systems. Please !!
!! archive this message indefinitely to allow verification of the logs.  !!
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to