Mailing List Archive

[Spamassassin Wiki] Update of "RuleUpdates" by Jeroen Massar
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Spamassassin Wiki" for change notification.

The following page has been changed by Jeroen Massar:
http://wiki.apache.org/spamassassin/RuleUpdates

------------------------------------------------------------------------------

TheoVanDinter

+ == sa-update in combination with AMaViS ==
+
+ AMaViS is not able to respect the LOCAL_STATE_DIR variable as Mail::SpamAssassin doesn't use the correct default [[http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4952 Bug#4952]]. On a Debian platform this would thus mean one would have to manually add the LOCAL_STATE_DIR in the /usr/sbin/amavisd perl script, this change though would be lost after a 'apt-get update' and render the daily updates unavailable and thus increase the amount of spam one is not tagging correctly. To cleanly integrate sa-update into an [http://www.amavis.org AMaViS] setup one should run the following script from a crontab (eg /etc/cron.daily/sa-updates) as root or another user having the required permissions to complete the scripts goal:
+ {{{
+ #!/bin/sh
+ #
+ # Updates SA, which is run by AMaViS with new rules
+
+ # Update the link to the correct version
+ VERSION=`grep -m 1 -E 'VERSION = ' /usr/share/perl5/Mail/SpamAssassin.pm | cut -f2 -d\"`
+ rm /var/lib/spamassassin/current
+ ln -s /var/lib/spamassassin/${VERSION} /var/lib/spamassassin/current
+
+ # Update from http://saupdate.openprotect.com & updates.spamassassin.org
+ # Restart AMaViS so that it reads in the new rules
+ sa-update --gpgkey D1C035168C1EBC08464946DA258CDB3ABDE9DC10 --channel saupdates.openprotect.com --gpgkey 26C900A46DD40CD5AD24F6D7DEE01987265FA05B --channel updates.spamassassin.org && /etc/init.d/amavis restart >/dev/null
+ }}}
+
+ This will thus update the channels and repoint the /var/lib/spamassassin/current to the current version directory.
+ This is required as AMaViS doesn't understand _VERSION_ in directory names.
+
+ Then have in your local.cf:
+ {{{
+ # OpenProtect SAUpdates
+ include /var/lib/spamassassin/current/saupdates_openprotect_com.pre
+ include /var/lib/spamassassin/current/saupdates_openprotect_com.cf
+
+ # Standard SA Updates
+ include /var/lib/spamassassin/current/updates.spamassassin.org.pre
+ include /var/lib/spamassassin/current/updates.spamassassin.org.cf
+ }}}
+
+ This will make AMaViS load these channels.
+
+ PS: See [http://saupdates.openprotect.com/ OpenProtect's SpamAssassin sa-update channel] for the details on the saupdates.openprotect.com channel.
+