King0770-Notes-Export And Import Spamassassin Rules

Revision as of 22:28, 27 June 2019 by King0770 (talk | contribs)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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
Host mta.example.com
	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 to the new machine.

Restore/Import

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

zmcontrol restart

**OR**

zmamavisdctl restart

More articles written by me, https://wiki.zimbra.com/wiki/King0770-Notes

Jump to: navigation, search