From: Stoiko Ivanov Date: Mon, 18 Nov 2019 09:03:17 +0000 (+0100) Subject: create pmg-scores.cf unconditionally X-Git-Url: https://git.proxmox.com/?p=pmg-api.git;a=commitdiff_plain;h=f9d8c3050836a0c86f78c4db9680f9cfc6b00228 create pmg-scores.cf unconditionally 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 Signed-off-by: Stoiko Ivanov --- diff --git a/src/PMG/Config.pm b/src/PMG/Config.pm index 30d7e6c..6e0a37c 100755 --- a/src/PMG/Config.pm +++ b/src/PMG/Config.pm @@ -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');