You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by David Jones <dj...@ena.com> on 2017/10/23 12:37:21 UTC
Re: Spamassassin // replicate configuration on multiple servers
On 10/19/2017 11:35 AM, Emanuel wrote:
> Hello,
>
> Is it possible to replicate the configuration, ie modify the
> configuration file to replicate on the other servers that share the
> cloud, or generate a shared database?
>
> Thanks for your help.
>
> Regards,
>
> Emanuel.
>
I will assume you meant the SA configuration in /etc/mail/spamassassin.
Yes. I do this on 8 servers with rsync. I have a master where I make
changes and a cron'd script will sync it to all other servers. This way
I only have to do sa-update, KAM.cf updates, custom rules/plugins,
freshclam, etc. on the master and it distributes to the other 7.
The rsync script uses SSH access from the master to the slaves with a
passphraseless key so it's very simple to rsync and even run commands on
the slaves to restart SA/MailScanner/Clamd when a change is detected on
the slaves. Disclaimer, a passphraseless SSH key can be risky so make
sure you have proper firewall rules and other restrictions in place to
keep security tight.
As far as sharing the Bayes DB, that is a different issue. If you have
your Bayes DB files on the filesystem, then you can rsync them too from
a master but you need to train your ham and spam from the master. If
you want to be able to train your bayes from any server, then you need
to use a shared storage like MySQL or Redis. I have a 9th server that
is used to collect ham and spam and do the Bayes training from there
nightly into the Redis DB.
--
David Jones
Re: Spamassassin // replicate configuration on multiple servers
Posted by Bill Cole <sa...@billmail.scconsult.com>.
On 23 Oct 2017, at 8:37, David Jones wrote:
> As far as sharing the Bayes DB, that is a different issue. If you
> have your Bayes DB files on the filesystem, then you can rsync them
> too from a master but you need to train your ham and spam from the
> master. If you want to be able to train your bayes from any server,
> then you need to use a shared storage like MySQL or Redis.
Not really. See the 'lock_method' parameter in the documentation of
Mail::SpamAssassin::Conf. I can confirm that 'nfssafe' is in fact
NFS-safe.