[pmg-devel] applied: [PATCH api] fix #3758: allow empty `to` in noqueue case
Stoiko Ivanov
s.ivanov at proxmox.com
Wed Dec 1 19:13:54 CET 2021
Huge thanks for addressing this so quickly!
Applied and tested with a problematic log.
On Wed, 1 Dec 2021 16:41:58 +0100
Mira Limbeck <m.limbeck at proxmox.com> wrote:
> Signed-off-by: Mira Limbeck <m.limbeck at proxmox.com>
> ---
> src/PMG/API2/MailTracker.pm | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/PMG/API2/MailTracker.pm b/src/PMG/API2/MailTracker.pm
> index 187decf..b8b25ad 100644
> --- a/src/PMG/API2/MailTracker.pm
> +++ b/src/PMG/API2/MailTracker.pm
> @@ -171,13 +171,14 @@ my $run_pmg_log_tracker = sub {
> $entry->{client} = $1;
> } elsif ($line =~ m/^CTIME:\s+([0-9A-F]+)$/) {
> # ignore ?
> - } elsif ($line =~ m/^TO:([0-9A-F]+):(T[0-9A-F]+L[0-9A-F]+):([0-9A-Z]):\s+from <([^>]*)>\s+to\s+<([^>]+)>$/) {
> + } elsif ($line =~ m/^TO:([0-9A-F]+):(T[0-9A-F]+L[0-9A-F]+):([0-9A-Z]):\s+from <([^>]*)>\s+to\s+<([^>]*)>$/) {
> my $e = {};
> $e->{client} = $entry->{client} if defined($entry->{client});
> $e->{time} = hex($1) - $timezone;
> $e->{id} = $2;
> $e->{dstatus} = $3;
> $e->{from} = $4;
> + die "empty to address only allowed in NOQUEUE case\n" if !$5 && $e->{dstatus} ne 'N';
> $e->{to} = $5;
> push @$list, $e;
> } elsif ($line =~ m/^LOGS:$/) {
More information about the pmg-devel
mailing list