]> git.proxmox.com Git - pmg-api.git/commitdiff
fix #2232: set rulename for default accept
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 6 Jun 2019 09:26:37 +0000 (11:26 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 6 Jun 2019 09:32:59 +0000 (11:32 +0200)
Logging the rulename along with the action taken introduced in
365d5b9549d25a910c82cd37034f05e1c906565a, introduced a regression, for the
default action (accept), since the accept-rule is instantiated directly it
did not set a name, resulting in an 'Use of uninitialized value' being written
to the mail.log for every mail not triggering any explicit rule.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
bin/pmg-smtp-filter

index 31fddd59f4c6ce7a6d6f4f180005215245a8072d..d1982390dedc8c6990d0d3969eab93c5753f83a5 100755 (executable)
@@ -353,7 +353,7 @@ sub apply_rules {
     if ($unmatched) {
        my $accept = PMG::RuleDB::Accept->new ();
        $accept->execute ($queue, $self->{ruledb}, $mod_group, $unmatched,
-                         $msginfo, undef, undef, undef);
+                         $msginfo, { RULE => 'default-accept' }, undef);
     }
 
     return $matching_rules;