]> git.proxmox.com Git - pmg-api.git/commitdiff
add pmg-smtp-filter ID to reply
authorMira Limbeck <m.limbeck@proxmox.com>
Tue, 18 Feb 2020 15:36:40 +0000 (16:36 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 27 Feb 2020 11:18:58 +0000 (12:18 +0100)
For the pmg-log-tracker to match the pmg-smtp-filter on a reject, we
need some kind of information. With the addition of the pmg-smtp-filter
ID we can match it the same way we do for an accept.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/PMG/SMTP.pm

index 544d0a505d37052181fd8261141614e17e64c01a..68c833e39dc96aa73b0207da069d38a2ad9cbccb 100644 (file)
@@ -161,7 +161,7 @@ sub loop {
                    my @reject_rec = grep { $qstat->{$_} eq 'blocked' } @rec;
 
                    if (scalar(@reject_rec) == scalar(@rec)) {
-                       $self->reply ("554 5.7.1 Rejected for policy reasons");
+                       $self->reply ("554 5.7.1 Rejected for policy reasons ($queueid)");
                        syslog('info', "reject mail $queueid");
                    } elsif ((scalar(@reject_rec) + scalar(@success_rec)) == scalar(@rec)) {
                        $self->reply ("250 2.5.0 OK ($queueid)");
@@ -170,7 +170,7 @@ sub loop {
                            generate_ndr($self->{from}, [ @reject_rec ], $dnsinfo->{fqdn}, $queueid) if scalar(@reject_rec);
                        }
                    } else {
-                       $self->reply ("451 4.4.0 detected undelivered mail");
+                       $self->reply ("451 4.4.0 detected undelivered mail ($queueid)");
                    }
                }
            }