[SA-exim] sa-exim's Greylisting.pm doesn't check for local connections

Marc MERLIN marc at merlins.org
Thu Nov 9 07:26:56 PST 2006


On Thu, Nov 09, 2006 at 04:01:51PM +0100, Andreas Vögele wrote:
> Dear Marc,
> 
> I'd like to scan messages with sa-exim that fetchmail directly
> delivers to the MTA with the sendmail command.  But Greylisting.pm
> from sa-exim v4.2.1 doesn't check whether the message was locally
> generated and so I get the following error messages in the log file :
> 
> Nov  2 16:48:20 example spamd[23021]: Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Mail/SpamAssassin/Plugin/Greylisting.pm line 176.
> Nov  2 16:48:20 example spamd[23021]: Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Mail/SpamAssassin/Plugin/Greylisting.pm line 177.
> 
> Of course, fetchmail could deliver the messages through the local
> interface, but for several reasons I prefer to use the sendmail
> command.
> 
> I've attached a small patch for Greylisting.pm.  The code added by
> this patch returns from greylisting() if the variable $connectip
> contains the string '<locally generated>'.  The header
> X-SA-Exim-Connect-IP is set to this string in sa-exim.c if the message
> was locally generated.

That's interesting. I guess you don't get the same from that as running your
own MTA on the net, but that's still a valid use I didn't think about.
If/when I have the next version, I'll include this patch.
In the meantime, I cced the sa-exim list so that others can benefit

Thanks,
Marc

Content-Description: Check for local connections
> --- Greylisting.pm.orig	2006-10-30 10:11:17.000000000 +0100
> +++ Greylisting.pm	2006-11-03 16:17:28.000000000 +0100
> @@ -103,6 +103,11 @@
>  	return 0;
>      }
>      chomp($connectip);
> +    if ($connectip eq '<locally generated>')
> +    {
> +	Mail::SpamAssassin::Plugin::dbg("GREYLISTING: skipping greylisting for locally generated message $mesgid");
> +	return 0;
> +    }
>      # Clean up input (for security, if you use files/dirs)
>      $connectip =~ /([\d.:]+)/;
>      $connectip = ($1 or "");


-- 
"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