SA-UPDATE(1p) | User Contributed Perl Documentation | SA-UPDATE(1p) |
sa-update - automate SpamAssassin rule updates
sa-update [options]
Options:
--channel channel Retrieve updates from this channel Use multiple times for multiple channels --channelfile file Retrieve updates from the channels in the file --checkonly Check for update availability, do not install --install filename Install updates directly from this file. Signature verification will use "file.asc", "file.sha256", and "file.sha512". --allowplugins Allow updates to load plugin code (DANGEROUS) --gpgkey key Trust the key id to sign releases Use multiple times for multiple keys --gpgkeyfile file Trust the key ids in the file to sign releases --gpghomedir path Store the GPG keyring in this directory --gpg and --nogpg Use (or do not use) GPG to verify updates (--gpg is assumed by use of the above --gpgkey and --gpgkeyfile options) --import file Import GPG key(s) from file into sa-update's keyring. Use multiple times for multiple files --updatedir path Directory to place updates, defaults to the SpamAssassin site rules directory (default: /var/lib/spamassassin/3.004006) --refreshmirrors Force the MIRRORED.BY file to be updated --httputil util Force used download tool. By default first found from these is used: curl, wget, fetch, lwp -D, --debug [area=n,...] Print debugging messages -v, --verbose Be verbose, like print updated channel names; For more verbosity specify multiple times -V, --version Print version -h, --help Print usage message -4 Force using the inet protocol (IPv4), not inet6 -6 Force using the inet6 protocol (IPv6), not inet
sa-update automates the process of downloading and installing new rules and configuration, based on channels. The default channel is updates.spamassassin.org, which has updated rules since the previous release.
Update archives are verified using SHA256 and SHA512 hashes and GPG signatures, by default.
Note that "sa-update" will not restart "spamd" or otherwise cause a scanner to reload the now-updated ruleset automatically. Instead, "sa-update" is typically used in something like the following manner:
sa-update && /etc/init.d/spamassassin reload
This works because "sa-update" only returns an exit status of 0 if it has successfully downloaded and installed an updated ruleset.
The program sa-update uses the underlying operating system umask for the updated rule files it installs. You may wish to run sa-update from a script that sets the umask prior to calling sa-update. For example:
#!/bin/sh umask 022 sa-update
sa-update --channel foo.example.com --channel bar.example.com
Files named file.sha256, file.sha512, and file.asc will be used for the SHA256 and SHA512 hashes and the GPG signature, respectively. The filename provided must contain a version number of at least 3 digits, which will be used as the channel's update version number.
Multiple --channel switches cannot be used with --install. To install multiple channels from tarballs, run "sa-update" multiple times with different --channel and --install switches, e.g.:
sa-update --channel foo.example.com --install foo-34958.tgz sa-update --channel bar.example.com --install bar-938455.tgz
You should never enable this for 3rd party update channels, since plugins can execute unrestricted code on your system, even possibly as root! This includes spamassassin official updates, which have no need to include running code.
Use --reallyallowplugins option to bypass warnings and make it work.
If you wish to skip GPG verification, you can use the --nogpg option to disable its use. Use of the following gpgkey-related options will override --nogpg and keep GPG verification enabled.
Note: Currently, only GPG itself is supported (ie: not PGP). v1.2 has been tested, although later versions ought to work as well.
By default, sa-update trusts key ids "24F434CE" and "5244EC45", which are the standard SpamAssassin release key and its sub-key. Use this option to trust additional keys. See the --import option for how to add keys to sa-update's keyring. For sa-update to use a key it must be in sa-update's keyring and trusted.
For multiple keys, use the option multiple times. i.e.:
sa-update --gpgkey E580B363 --gpgkey 298BC7D0
Note: use of this option automatically enables GPG verification.
/etc/spamassassin/sa-update-keys
To import multiple keys, use the option multiple times. i.e.:
sa-update --import channel1-GPG.KEY --import channel2-GPG.KEY
Note: use of this option automatically enables GPG verification.
/var/lib/spamassassin/3.004006
If the updates should be stored in another location, specify it here.
Note that use of this option is not recommended; if you're just using sa-update to download updated rulesets for a scanner, and sa-update is placing updates in the wrong directory, you probably need to rebuild SpamAssassin with different "Makefile.PL" arguments, instead of overriding sa-update's runtime behaviour.
sa-update -D channel,gpg,http
For more information about which areas (also known as channels) are available, please see the documentation at <http://wiki.apache.org/spamassassin/DebugChannels>.
In absence of a --checkonly option, an exit code of 0 means: an update was available, and was downloaded and installed successfully. If --checkonly was specified, an exit code of 0 means: an update was available.
An exit code of 1 means no fresh updates were available.
An exit code of 2 means that at least one update is available but that a lint check of the site pre files failed. The site pre files must pass a lint check before any updates are attempted.
An exit code of 3 means that at least one update succeeded while other channels failed. If using sa-compile, you should proceed with it.
An exit code of 4 or higher, indicates that errors occurred while attempting to download and extract updates, and no channels were updated.
Mail::SpamAssassin(3) Mail::SpamAssassin::Conf(3) spamassassin(1) spamd(1) <http://wiki.apache.org/spamassassin/RuleUpdates>
"Mail::SpamAssassin"
See <http://issues.apache.org/SpamAssassin/>
The Apache SpamAssassin(tm) Project <https://spamassassin.apache.org/>
SpamAssassin is distributed under the Apache License, Version 2.0, as described in the file "LICENSE" included with the distribution.
Copyright (C) 2015 The Apache Software Foundation
2021-05-30 | perl v5.32.1 |