[SA-exim] undefined vars in Greylisting.pm

Marc MERLIN marc at merlins.org
Tue Feb 6 14:05:41 PST 2007


On Mon, Jan 22, 2007 at 11:59:14PM +0100, John Bro wrote:
> Hello all,
> 
> I just joined, because I just started using SA-Exim and spamd,
> and greylisting on my home mail server (Debian Etch)
> (where I'm the only user), and although it seems to be performing
> quite nicely (i.e. spam is being blocked, greylisted messages get
> through when they should, or get dumped when they're spam)...
> 
> There are a  couple complaints (documented below) that have me
> stumped. Each message produces these complaints from perl:
> 
> 
> Jan 22 21:02:03 jhbro spamd[3013]: Use of uninitialized value in
>   concatenation (.) or string at
>   /usr/share/perl5/Mail/SpamAssassin/Plugin/Greylisting.pm line 176,
>   <GEN26> line 57.
> 
> Jan 22 21:02:03 jhbro spamd[3013]: Use of uninitialized value in
>   concatenation (.) or string at
>   /usr/share/perl5/Mail/SpamAssassin/Plugin/Greylisting.pm line 177,
>   <GEN26> line 57.
> 
> 
> and each time, the same 2 messages 2 seconds later.
> The lines of Greylisting.pm in question are as follows:
> 
> 172: $connectip =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/;
> 173: my ($ipbyte1, $ipbyte2, $ipbyte3, $ipbyte4) = ($1, $2, $3, $4);
> 174: my $ipdir1 = "$option{'dir'}/$ipbyte1";
> 175: # --------------------------
> 176: my $ipdir2 = "$ipdir1/$ipbyte2";
> 177: my $ipdir3 = "$ipdir2/$ipbyte3";
 
Mmmh, that's not supposed to happen, it means that you got half an IP,
or something of the sort. Is there a chance you can get it to print out
what the value of $connectip is when this happens?

Actually, I should have the code say 
warn "Bad connectip: $connectip\n" if (not defined ($ipbyte1) or not defined ($ipbyte2) or not defined ($ipbyte3) or not defined ($ipbyte4));
Right after line 173

Do you mind adding that?

> So clearly, something in the regexp coming up empty.
> Also, sometimes, (although not at exactly the same time)
> I see this problem:
> 
> Jan 22 21:25:59 jhbro spamd[3013]: Couldn't get Connecting IP
>   header X-SA-Exim-Connect-IP for message
>   <GRIPSOU75iMaUfOImd10016421f at smtp2.dmz.local>,
>   skipping greylisting call
 
Yeah, that's typically because you run sa-exim on a locally generated
message that doesn't have a connecting IP.

> The absence of a connectip/Connect-IP seems to relate the two
> complaints.. but I see headers for SA-Exim-Connect-IP in the message,
> and the Received headers contain IP numbers.. I don't get it.

Uh?
Ok, can you print those headers from inside the Greylisting.pm code
right before you get the warning (around line 101)? 
 
> I can't figure out how to configure things such that rejected
> messages do not generate an attempt to bounce to the (? always)
> bogus From: address.  It would appear that I am accepting messages
> rather than rejecting them at SMTP time, and thus exim things it has
> to send back an "undeliverable".  Where have I enabled this??
 
Mmmh, the only reason I can think for that is that you aren't running
sa-exim on your outside MX, but you are accepting the message on some
outside server, and then forwarding to an inside machine that runs
sa-exim.
Otherwise, there is no exim setting that I can think of, sa-exim tells
exim to refuse the mail at smtp time, so exim should not generate a
bounce message for it.

I hope this helps.

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/



More information about the SA-Exim mailing list