[pmg-devel] [PATCH v7 pmg-api 1/1] add pmg-smtp-filter ID to reply

Mira Limbeck m.limbeck at proxmox.com
Tue Feb 18 16:36:40 CET 2020


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 at proxmox.com>
---
 src/PMG/SMTP.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PMG/SMTP.pm b/src/PMG/SMTP.pm
index 544d0a5..68c833e 100644
--- a/src/PMG/SMTP.pm
+++ b/src/PMG/SMTP.pm
@@ -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)");
 		    }
 		}
 	    }
-- 
2.20.1




More information about the pmg-devel mailing list