Update rules for multiple servers
Posted: 31 May 2020, 12:02
We run MailScanner and MFE on around 30 servers and always have an issue if we need to make a change, particularly to the following 2 files:
spam.whitelist.rules
spam.blacklist.rules
We get the same SPAM on all servers so I am thinking about a way to populate the rules to all servers.
So far I am thinking that if we keep a central URL where we can edit both files and store them, eg. mydomain/spamrules/spam.blacklist.rule
Next, perhaps a bash script on each server that will:
wget both files from mydomain/spamrules/
then get the bash script to run /bin/systemctl reload MailScanner.service
This sounds like a plan in theory, but the issue I am facing is that some clients add custom entries to the above to 2 files and my bash cron will override those changes. Appending to the end of the file might also be an issue as many duplicates will then be added with each cron run.
Just wondering if anyone else has a similar issue and/or if they have a solution.
spam.whitelist.rules
spam.blacklist.rules
We get the same SPAM on all servers so I am thinking about a way to populate the rules to all servers.
So far I am thinking that if we keep a central URL where we can edit both files and store them, eg. mydomain/spamrules/spam.blacklist.rule
Next, perhaps a bash script on each server that will:
wget both files from mydomain/spamrules/
then get the bash script to run /bin/systemctl reload MailScanner.service
This sounds like a plan in theory, but the issue I am facing is that some clients add custom entries to the above to 2 files and my bash cron will override those changes. Appending to the end of the file might also be an issue as many duplicates will then be added with each cron run.
Just wondering if anyone else has a similar issue and/or if they have a solution.