No semantic change, just avoids an ugly warning. Can normally only
happen if a mail is send/inject directly from the PMG host.
fwiw, all the rule implementation that actually use $ip got an early
return 0 if $ip evaluates to false(y), one might actually consider
checking the counterpart too for false-y in this case, and return a
match if both are false (or maybe better, make the check a
definedness one); but as this is for an edge case we might just keep
it as is for now, worked ok for more than a decade..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
return 1 if !defined ($from);
# postfix prefixes ipv6 addresses with IPv6:
- if ($ip =~ /^IPv6:(.*)/) {
+ if (defined($ip) && $ip =~ /^IPv6:(.*)/) {
$ip = $1;
}