]> git.proxmox.com Git - pmg-api.git/commitdiff
fix #2276: restore line format for pmg-log-tracker
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 12 Jul 2019 13:49:05 +0000 (15:49 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 12 Jul 2019 15:02:09 +0000 (17:02 +0200)
pmg-log-tracker requires a specific format of the output of the
smtp-filter to correctly detect and recognize emails and message ids

commit 365d5b9549d25a910c82cd37034f05e1c906565a
changed the format of some lines (by including the rule name)
so that pmg-log-tacker did not correctly parse it anymore

this patch changes the format in a way that the log-tracker
can parse and still display the new information

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PMG/RuleDB/Accept.pm
PMG/RuleDB/Quarantine.pm

index 79fb0d870cd8384892d4c1f4ca0350a8a3dfb0df..8e76d8f4d8d8d988d24223a765aaa92991b642cb 100644 (file)
@@ -113,7 +113,7 @@ sub execute {
                $msginfo->{xforward}, $msginfo->{fqdn});
            if ($qid) {
                foreach (@$tg) {
-                   syslog('info', "%s: accept mail to <%s> (rule: %s, %s)", $queue->{logid}, encode('UTF-8', $_), $rulename, $qid);
+                   syslog('info', "%s: accept mail to <%s> (%s) (rule: %s)", $queue->{logid}, encode('UTF-8', $_), $qid, $rulename);
                }
                $queue->set_status ($tg, 'delivered', $qid);
            } else {
index aaa8623f9672c77fdd5448175d0c394ad253118a..1426393f482b3427425a32ed11ab716115164342 100644 (file)
@@ -100,7 +100,7 @@ sub execute {
            if (my $qid = $queue->quarantine_mail($ruledb, 'V', $entity, $tg, $msginfo, $vars, $ldap)) {
 
                foreach (@$tg) {
-                   syslog ('info', "$queue->{logid}: moved mail for <%s> to virus quarantine (rule: %s, %s)", $_, $rulename, $qid);
+                   syslog ('info', "$queue->{logid}: moved mail for <%s> to virus quarantine - %s (rule: %s)", $_, $qid, $rulename);
                }
 
                $queue->set_status ($tg, 'delivered');
@@ -110,7 +110,7 @@ sub execute {
            if (my $qid = $queue->quarantine_mail($ruledb, 'S', $entity, $tg, $msginfo, $vars, $ldap)) {
 
                foreach (@$tg) {
-                   syslog ('info', "$queue->{logid}: moved mail for <%s> to spam quarantine (rule: %s, %s)", $_, $rulename, $qid);
+                   syslog ('info', "$queue->{logid}: moved mail for <%s> to spam quarantine - %s (rule: %s)", $_, $qid, $rulename);
                }
 
                $queue->set_status($tg, 'delivered');