At 20:31 01/04/2002, you wrote:
>However, from time to time, I still get SA flagging mails that originated
>from a dialup IP and were relayed through the ISP (the way it should have
>been)
>
>Will SA  penalize a mail if  any IP in the  received headers is in  a DUL or
>only if the first line (seen last) Received line has an IP in DUL?

I've noticed earlier on the list that the RBL checking isn't perfect. If 
there's more than one relay it checks the last two. The last one 
(originator) will most likely be dialup / cable and will receive scores 
from zones which include these (osirusoft, 5-10, etc.)

The answer lies in perl5/site_perl/5.6.0/Mail/SpamAssassin/EvalTests.pm 
(for path ymmv) line 395ff.

I've hacked some stuff in there to sort out the IPs that ought to be 
checked on a zone basis, would probably be nice as feature for the .cf 
files (like check 1-last or so  forth). For example I check ORDB and bounce 
mail matching it before it ever gets to spamassassin hence no point 
checking again etc.

# First  I also included IPs in round brackets not just "["
# not a nice hack but works...
   my @ips = ($rcv =~ /\[(\d+\.\d+\.\d+\.\d+)\]/g);
   my @ips2 = ($rcv =~ /\((\d+\.\d+\.\d+\.\d+)\)/g);
   push(@ips,@ips2);
   return 0 unless ($#ips >= 0);

   # First check that DNS is available, if not do not perform this check
   # Nothing changed here
   return 0 if $self->{conf}->{skip_rbl_checks};
   return 0 unless $self->is_dns_available();
   $self->load_resolver();

#  This is the original routine
#  if ($#ips > 1) {
#    @ips = @ips[$#ips-1 .. $#ips];        # only check the originating 2
#  }


   if ($#ips >= 1) {
       if ($rbl_domain eq "relays.ordb.org.")
       { @ips = @ips[1 .. $#ips-1];
         #check 2nd to last-1 ip because ordb is done at SMTP level
       }

       if ($rbl_domain ne "relays.ordb.org.")
       { @ips = @ips[0 .. $#ips-1];
         #check all but originator
       }

   }

  if ($#ips >= 0)
  {

the rest of the function...

   }
}


All the best,
Gregor


_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to