[pmg-devel] applied: [PATCH pmg-api] fix #2276: restore line format for pmg-log-tracker
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Jul 12 17:04:10 CEST 2019
Am 7/12/19 um 3:49 PM schrieb Dominik Csapak:
> 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 at proxmox.com>
> ---
> PMG/RuleDB/Accept.pm | 2 +-
> PMG/RuleDB/Quarantine.pm | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
applied, much thanks for the quick find and fix!
>
> diff --git a/PMG/RuleDB/Accept.pm b/PMG/RuleDB/Accept.pm
> index 79fb0d8..8e76d8f 100644
> --- a/PMG/RuleDB/Accept.pm
> +++ b/PMG/RuleDB/Accept.pm
> @@ -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 {
> diff --git a/PMG/RuleDB/Quarantine.pm b/PMG/RuleDB/Quarantine.pm
> index aaa8623..1426393 100644
> --- a/PMG/RuleDB/Quarantine.pm
> +++ b/PMG/RuleDB/Quarantine.pm
> @@ -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');
>
More information about the pmg-devel
mailing list