Patch to Postfix.pm to fix IPv6 address parsing
Patrick Vande Walle
patrick at vande-walle.eu
Mon Apr 20 10:16:03 IST 2009
On Mon, 20 Apr 2009 09:26:48 +0100, Julian Field
<MailScanner at ecs.soton.ac.uk> wrote:
>> - } elsif ($recdata =~ /^Received: .+\[([\dabcdef.:]+)\]/i) {
>> +# Linux adds "IPv6:" on the front of the IPv6 address, so remove it
>> + if ($recdata =~ /^Received: .+\[(?:IPv6:)?([\dabcdef.:]+)\]/i) {
>> unless ($read1strcvd) {
>> $ipfromheader = $1;
>>
> Are you sure you meant $1 and not $2 here?
>> $read1strcvd = 1;
>>
>
> Jules
I did not change that part of the code. It is consistent with the code in
Sendmail.pm and earlier code in Postfix.pm, too.
I tested with $2 and it returns nothing. So yes, $1 is OK.
Patrick Vande Walle
More information about the MailScanner
mailing list