]> git.proxmox.com Git - pmg-api.git/commitdiff
create pmg-scores.cf unconditionally
authorStoiko Ivanov <s.ivanov@proxmox.com>
Mon, 18 Nov 2019 09:03:17 +0000 (10:03 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Nov 2019 13:37:23 +0000 (14:37 +0100)
with the recent addtion of adjustable SA-rule scores, we introduced
'/etc/mail/spamassassin/pmg-scores.cf' as a new file and included it in the
cluster synchronization.

If the file does not exist the `rsync` command complains leading to misleading
errors in the journal.

Unconditionally creating the file (like we do for the already existing
'custom.cf') removes the warnings.

Reported-by: Martin Maurer <martin@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/Config.pm

index 30d7e6cb15ae7d9c6d17a7fa15847b0367230cb4..6e0a37cb6d6c3bbb4dac8f47980c7a10a8d53953 100755 (executable)
@@ -1396,8 +1396,9 @@ sub rewrite_config_spam {
        $changes = 1 if unlink '/root/.spamassassin/bayes_toks';
     }
 
-    # make sure we have a custom.cf file (else cluster sync fails)
+    # make sure we have the custom SA files (else cluster sync fails)
     IO::File->new('/etc/mail/spamassassin/custom.cf', 'a', 0644);
+    IO::File->new('/etc/mail/spamassassin/pmg-scores.cf', 'a', 0644);
 
     $changes = 1 if $self->rewrite_config_file(
        'local.cf.in', '/etc/mail/spamassassin/local.cf');