MailScanner & IPv6 [SOLVED]
Julian Field
MailScanner at ecs.soton.ac.uk
Wed Apr 6 18:14:40 IST 2005
[ The following text is in the "ISO-8859-15" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
I am pretty sure the IPv6: leader is Linux-specific, it should just put
the IP(v6) address in there.
I certainly do not want the IPv6: included in the IP address inside
MailScanner.
So I'm going with Rick's suggestion below.
Rick Cooper wrote:
> if ($ip =~ /\[(?:IPv6:)?([\d.:abcdef]+)\]/) {
So the relevant bit of Sendmail.pm (starting line 317) now reads:
if ($Line =~ /^\$_/) {
$ip = $Line;
#chomp $ip;
# Linux adds "IPv6:" on the front of the IPv6 address, so remove it
if ($ip =~ /\[(?:IPv6:)?([\d.:abcdef]+)\]/) {
$message->{clientip} = $1;
} else {
# It is a locally-created message and doesn't have an smtp
client ip
$message->{clientip} = '127.0.0.1';
}
$IPFound = 1; # We have found the client IP address
}
--
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list