King0770-Notes-Export And Import Spamassassin Rules

The following is to export your existing Spamassassin Baye rules from one machine to another:

Note: For the context of this article, a machine is running MTA and Amavis services.

zmcontrol status
	amavis                  Running
	antispam                Running
	antivirus               Running
	mta                     Running
	opendkim                Running
	zmconfigd               Running

Possible scenarios

  • Retiring an existing machine, with a new machine
  • Adding a new machine

How to export

/opt/zimbra/common/bin/sa-learn --dbpath /opt/zimbra/data/amavisd/.spamassassin --backup >> /tmp/sa.db

Then copy the /tmp/sa.db file to the new machine.


/opt/zimbra/common/bin/sa-learn --dbpath /opt/zimbra/data/amavisd/.spamassassin --restore /tmp/sa.db

zmcontrol restart


zmamavisdctl restart

More articles written by me,

Jump to: navigation, search