MailScanner & IPv6 [SOLVED]

Julian Field MailScanner at
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
So I'm going with Rick's suggestion below.

Rick Cooper wrote:

> if ($ip =~ /\[(?:IPv6:)?([\d.:abcdef]+)\]/) {

So the relevant bit of (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} = '';
        $IPFound = 1; # We have found the client IP address

Julian Field
Buy the MailScanner book at
Professional Support Services at
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 with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ ( and
the archives (

Support MailScanner development - buy the book off the website!

More information about the MailScanner mailing list