Fix postfix log entry with to=+orig_to= that was not storing the date and in consequences was not added to data file. Thanks to kpal38 for the report.

This commit is contained in:
Darold Gilles 2016-04-01 13:57:49 +02:00
parent 4b1e7b75dd
commit c02bf95fa0

View file

@ -1031,7 +1031,7 @@ sub parse_sendmail
}
# POSTFIX To clause with origine
} elsif ($str =~ m#^([^:\s]+): to=([^,]+), orig_to=([^,]+), relay=([^,]+),.*status=(.*)#) {
} elsif ($str =~ m#^([^:\s]+): to=([^,]+), orig_to=([^,]*), relay=([^,]+),.*status=(.*)#) {
my $id = $KEEP_TEMPORARY{$1} || $1;
my $to = &edecode($2);
my $relay = &clean_relay(lc($4));
@ -1046,6 +1046,7 @@ sub parse_sendmail
$t = &edecode($t);
return if ($t eq 'more');
next if ($CONFIG{EXCLUDE_TO} && ($t =~ /^$CONFIG{EXCLUDE_TO}$/));
push(@{$TO{$host}{$id}{date}}, $time_st);
push(@{$TO{$host}{$id}{to}}, $t);
push(@{$TO{$host}{$id}{status}}, $status);
}