Subversion Repositories sa-exim

Compare Revisions

Ignore whitespace Rev 39 → Rev 40

/trunk/debian/changelog
5,8 → 5,10
* New maintainer email address.
* Use modern fields in debian/control (Homepage; Vcs-* fields without
XS-).
* Greylisting.pm: Bail out if a non-IPv4 address is encountered
(Closes: #300103, #479955).
 
-- Magnus Holmgren <holmgren@debian.org> Tue, 03 Jun 2008 20:58:46 +0200
-- Magnus Holmgren <holmgren@debian.org> Tue, 03 Jun 2008 22:19:14 +0200
 
sa-exim (4.2.1-9) unstable; urgency=high
 
/trunk/Greylisting.pm
170,16 → 170,19
# connectip is supposed to be untainted now, but I was still getting
# some insecure dependecy error messages sometimes (perl 5.8 problem apparently)
$connectip =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/;
my ($ipbyte1, $ipbyte2, $ipbyte3, $ipbyte4) = ($1, $2, $3, $4);
my $ipdir1 = "$option{'dir'}/$ipbyte1";
my $ipdir2 = "$ipdir1/$ipbyte2";
my $ipdir3 = "$ipdir2/$ipbyte3";
unless ($connectip =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/) {
warn "Can only handle IPv4 addresses; skipping greylisting call for message $mesgid\n";
return 0;
}
 
my $ipdir1 = "$option{'dir'}/$1";
my $ipdir2 = "$ipdir1/$2";
my $ipdir3 = "$ipdir2/$3";
my $ipdir4;
my $tupletdir;
 
$ipdir4 = "$ipdir3";
$ipdir4 .= "/$ipbyte4" if ($option{'greylistfourthbyte'});
$ipdir4 .= "/$4" if ($option{'greylistfourthbyte'});
$tupletdir = "$ipdir4/$envfrom";
 
$tuplet = "$tupletdir/$rcptto";