You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sysadmins@spamassassin.apache.org by Emanuel <em...@donweb.com> on 2017/10/19 16:35:31 UTC

Spamassassin // replicate configuration on multiple servers

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.

-- 
envialosimple.com <http://www.envialosimple.com> 	
Emanuel Gonzalez
Deliverability Specialist
emanuel.gonzalez@donweb.com <ma...@donweb.com>
www.envialosimple.com <http://www.envialosimple.com>
by donweb <http://www.envialosimple.com>

Nota de confidencialidad: Este mensaje y archivos adjuntos al mismo son 
confidenciales, de uso exclusivo para el destinatario del mismo. La 
divulgación y/o uso del mismo sin autorización por parte de DonWeb.com 
queda prohibida.
DonWeb.com no se hace responsable del mensaje por la falsificación y/o 
alteración del mismo.
De no ser Ud el destinatario del mismo y lo ha recibido por error, por 
favor, notifique al remitente y elimínelo de su sistema.
Confidentiality Note: This message and any attachments (the message) are 
confidential and intended solely for the addressees. Any unauthorised 
use or dissemination is prohibited by DonWeb.com.
DonWeb.com shall not be liable  for the message if altered or falsified.
If you are not the intended addressee of this message, please cancel it 
immediately and inform the sender
Nota de Confidencialidade: Esta mensagem e seus eventuais anexos podem 
conter dados confidenciais ou privilegiados.
Se você os recebeu por engano ou não é um dos destinatários aos quais 
ela foi endereçada, por favor destrua-a e a todos os seus eventuais 
anexos ou copias realizadas, imediatamente.
É proibida a retenção, distribuição, divulgação ou utilização de 
quaisquer informações aqui contidas.
Por favor, informenos sobre o recebimento indevido desta mensagem, 
retornando-a para o autor.


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.

Re: Spamassassin // replicate configuration on multiple servers

Posted by David Jones <dj...@ena.com>.
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