[pmg-devel] [PATCH pmg-api] create pmg-scores.cf unconditionally

Stoiko Ivanov s.ivanov at proxmox.com
Mon Nov 18 10:03:17 CET 2019


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 at proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
Sorry for missing that glitch while testing!

 src/PMG/Config.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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');
-- 
2.20.1




More information about the pmg-devel mailing list