Sync two nethserver's rspamd databases

NethServer Version: latest
Module: rspamd

Should this be possible? The plan is to have them share the filters and white lists.


1 Like

Nethserver “goal” is the “swiss tool” for a single company. Multidomain capable.
You can migrate it via backup from old server to new server. With rspamd settings and infos.

So why should be synced these infos among more than one server?

Hi pike,
I’m just trying to save time.
I want to enter a bad domain in one server and replicate it to other server.
I read it one can set the redis databases as master/slave and that will make them sync.


Hi @jfranco

I don’t see any link you posted where this is stated as possible - in NethServer or anywhere else…

As I’m just trying to save time, I won’t bother with researching your personal issue, as you have no further infos.

My 2 cents

Beside the goal or the use case that i still don’t understand (or wishing to assume before it’s plain written), there’s no sync among master and slave. Only update: master has new data that slave receive and write (a deletion is still a write), not the other way around.

Also, redis for rSpamD is some kind of set of scrapbook collections: help remember in fast and right way which servers contact the mailserver and how to behave in accoriding to the configuration setup. Might be faster already have some notes to compare, but mailserver are processing the same kind of data (email massages) not the same kind of counterparts. A trade company with foreign buyers or sellers is receiving different messages from different countries than a lawyer, accountant or production firm. Maybe same different countries, but totally different counterparts: redis data become at load irrelevant, because the are related with the traffic of the source server.

1 Like

what about a rsync job on the main server to copy the values to the remote server

by ssh do a command on the remote sever by a cron on the main server

SenderBlackList=$(config getprop rspamd SenderBlackList)
SenderWhiteList=$(config getprop rspamd SenderWhiteList)

ssh root@remote config setprop  rspamd SenderBlackList $SenderBlackList
ssh root@remote config setprop rspamd SenderWhiteList $SenderWhiteList

#do an event by ssh on the remote server

ssh root@remote signal-event nethserver-mail-filter-save

not tested in real situation but it could work to sync your whitelist and blacklist

you need to set obviously a ssh key


Hi @stephdl,

Thank you very much! This works perfect for the white/black list!
It does not train the rspamd database as I thought it would! But nevertheless this is perfect!

Best regards,

1 Like

interesting hint :smiley: