HEX
Server: LiteSpeed
System: Linux server.searchcove.com 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
User: lurax (1083)
PHP: 8.3.30
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/share/man/man1/sa-update.1
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "SA-UPDATE 1"
.TH SA-UPDATE 1 "2026-03-06" "perl v5.26.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
sa\-update \- automate SpamAssassin rule updates
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
\&\fBsa-update\fR [options]
.PP
Options:
.PP
.Vb 10
\&  \-\-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 file          Install updates directly from this file. Signature
\&                          verification will use "file.asc", or "file.sha512"
\&                          or "file.sha256".
\&  \-\-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\*(Aqs
\&                          keyring. Use multiple times for multiple files
\&  \-\-updatedir path        Directory to place updates, defaults to the
\&                          SpamAssassin site rules directory
\&                          (default: /var/lib/spamassassin/4.000002)
\&  \-\-refreshmirrors        Force the MIRRORED.BY file to be updated
\&  \-\-forcemirror url       Use a specific mirror instead of downloading from
\&                          official mirrors
\&  \-\-httputil util         Force used download tool. By default first found
\&                          from these is used: curl, wget, fetch, lwp
\&  \-\-score\-multiplier x.x  Adjust all scores from update channel, multiply
\&                          with given value (integer or float).
\&  \-\-score\-limit x.x       Adjust all scores from update channel, limit
\&                          to given value (integer or float). Limiting
\&                          is done after possible multiply operation.
\&  \-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
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
sa-update automates the process of downloading and installing new rules and
configuration, based on channels.  The default channel is
\&\fIupdates.spamassassin.org\fR, which has updated rules since the previous
release.
.PP
\&\s-1NOTE:\s0 channel names are domain names, but \s-1DO NOT\s0 typically have any \s-1DNS\s0
records other than (maybe) \s-1NS\s0 records. There is a tree of records below that
name which denote the SpamAssassin version and resolve that name to the 
version number of the latest rules, e.g. to find the latest update
version number for SpamAssassin v4.0.0:
.PP
.Vb 3
\&  $ host \-t txt 0.0.4.updates.spamassassin.org 
\&  0.0.4.updates.spamassassin.org is an alias for 3.3.3.updates.spamassassin.org.
\&  3.3.3.updates.spamassassin.org descriptive text "1907730"
.Ve
.PP
That also illuminates the fact that the current ruleset is supposed to be 
backward-compatible to v3.3.3.
.PP
Update archives are verified using \s-1GPG\s0 signatures by default.  If \s-1GPG\s0 is
disabled (not recommended), file integrity is checked with \s-1SHA512\s0 or \s-1SHA256\s0
checksums.
.PP
Note that \f(CW\*(C`sa\-update\*(C'\fR will not restart \f(CW\*(C`spamd\*(C'\fR or otherwise cause
a scanner to reload the now-updated ruleset automatically.  Instead,
\&\f(CW\*(C`sa\-update\*(C'\fR is typically used in something like the following manner:
.PP
.Vb 1
\&        sa\-update && /etc/init.d/spamassassin reload
.Ve
.PP
This works because \f(CW\*(C`sa\-update\*(C'\fR only returns an exit status of \f(CW0\fR if
it has successfully downloaded and installed an updated ruleset.
.PP
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:
.PP
.Vb 3
\&        #!/bin/sh
\&        umask 022
\&        sa\-update
.Ve
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\fB\-\-channel\fR" 4
.IX Item "--channel"
sa-update can update multiple channels at the same time.  By default, it will
only access \*(L"updates.spamassassin.org\*(R", but more channels can be specified via
this option.  If there are multiple additional channels, use the option
multiple times, once per channel.  i.e.:
.Sp
.Vb 1
\&        sa\-update \-\-channel foo.example.com \-\-channel bar.example.com
.Ve
.IP "\fB\-\-channelfile\fR" 4
.IX Item "--channelfile"
Similar to the \fB\-\-channel\fR option, except specify the additional channels in a
file instead of on the commandline.  This is useful when there are a
lot of additional channels.
.IP "\fB\-\-checkonly\fR" 4
.IX Item "--checkonly"
Only check if an update is available, don't actually download and install it.
The exit code will be \f(CW0\fR or \f(CW1\fR as described below.
.IP "\fB\-\-install\fR" 4
.IX Item "--install"
Install updates \*(L"offline\*(R", from the named tar.gz file, instead of performing
\&\s-1DNS\s0 lookups and \s-1HTTP\s0 invocations.
.Sp
Files named \fBfile\fR.asc, \fBfile\fR.sha512, or \fBfile\fR.sha256 will be used for
\&\s-1GPG\s0 signature, and the \s-1SHA256\s0 and \s-1SHA512\s0 checksums, 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.
.Sp
Multiple \fB\-\-channel\fR switches cannot be used with \fB\-\-install\fR.  To install
multiple channels from tarballs, run \f(CW\*(C`sa\-update\*(C'\fR multiple times with different
\&\fB\-\-channel\fR and \fB\-\-install\fR switches, e.g.:
.Sp
.Vb 2
\&        sa\-update \-\-channel foo.example.com \-\-install foo\-34958.tgz
\&        sa\-update \-\-channel bar.example.com \-\-install bar\-938455.tgz
.Ve
.IP "\fB\-\-allowplugins\fR" 4
.IX Item "--allowplugins"
Allow downloaded updates to activate plugins.  The default is not to
activate plugins; any \f(CW\*(C`loadplugin\*(C'\fR or \f(CW\*(C`tryplugin\*(C'\fR lines will be commented
in the downloaded update rules files.
.Sp
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.
.Sp
Use \-\-reallyallowplugins option to bypass warnings and make it work.
.IP "\fB\-\-gpg\fR, \fB\-\-nogpg\fR" 4
.IX Item "--gpg, --nogpg"
sa-update by default will verify update archives by use of \s-1GPG\s0 signature.
.Sp
If you wish to skip \s-1GPG\s0 verification (very unsafe), you can use the
\&\fB\-\-nogpg\fR option to disable its use.  Use of the following gpgkey-related
options will override \fB\-\-nogpg\fR and keep \s-1GPG\s0 verification enabled.
.Sp
If \s-1GPG\s0 is disabled, only \s-1SHA512\s0 or \s-1SHA256\s0 checksums are used to verify
whether or not the downloaded archive has been corrupted, but it does not
offer any form of security regarding whether or not the downloaded archive
is legitimate (aka: non-modifed by evildoers).
.Sp
Note: Only GnuPG is supported (ie: not any other \s-1PGP\s0 software).
.IP "\fB\-\-gpgkey\fR" 4
.IX Item "--gpgkey"
sa-update has the concept of \*(L"release trusted\*(R" \s-1GPG\s0 keys.  When an archive is
downloaded and the signature verified, sa-update requires that the signature
be from one of these \*(L"release trusted\*(R" keys or else verification fails.  This
prevents third parties from manipulating the files on a mirror, for instance,
and signing with their own key.
.Sp
By default, sa-update trusts key ids \f(CW\*(C`24F434CE\*(C'\fR and \f(CW\*(C`5244EC45\*(C'\fR, which are
the standard SpamAssassin release key and its sub-key.  Use this option to
trust additional keys.  See the \fB\-\-import\fR 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.
.Sp
For multiple keys, use the option multiple times.  i.e.:
.Sp
.Vb 1
\&        sa\-update \-\-gpgkey E580B363 \-\-gpgkey 298BC7D0
.Ve
.Sp
Note: use of this option automatically enables \s-1GPG\s0 verification.
.IP "\fB\-\-gpgkeyfile\fR" 4
.IX Item "--gpgkeyfile"
Similar to the \fB\-\-gpgkey\fR option, except specify the additional keys in a file
instead of on the commandline.  This is extremely useful when there are a lot
of additional keys that you wish to trust.
.IP "\fB\-\-gpghomedir\fR" 4
.IX Item "--gpghomedir"
Specify a directory path to use as a storage area for the \f(CW\*(C`sa\-update\*(C'\fR \s-1GPG\s0
keyring.  By default, this is
.Sp
.Vb 1
\&        /etc/mail/spamassassin/sa\-update\-keys
.Ve
.IP "\fB\-\-import\fR" 4
.IX Item "--import"
Use to import \s-1GPG\s0 key(s) from a file into the sa-update keyring which is
located in the directory specified by \fB\-\-gpghomedir\fR.  Before using channels
from third party sources, you should use this option to import the \s-1GPG\s0 key(s)
used by those channels.  You must still use the \fB\-\-gpgkey\fR or \fB\-\-gpgkeyfile\fR
options above to get sa-update to trust imported keys.
.Sp
To import multiple keys, use the option multiple times.  i.e.:
.Sp
.Vb 1
\&        sa\-update \-\-import channel1\-GPG.KEY \-\-import channel2\-GPG.KEY
.Ve
.Sp
Note: use of this option automatically enables \s-1GPG\s0 verification.
.IP "\fB\-\-refreshmirrors\fR" 4
.IX Item "--refreshmirrors"
Force the list of sa-update mirrors for each channel, stored in the \s-1MIRRORED.BY\s0
file, to be updated.  By default, the \s-1MIRRORED.BY\s0 file will be cached for up to
7 days after each time it is downloaded.
.IP "\fB\-\-forcemirror\fR" 4
.IX Item "--forcemirror"
Force the download from a specific host instead of relying on mirrors listed
in \s-1MIRRORED.BY.\s0
.IP "\fB\-\-updatedir\fR" 4
.IX Item "--updatedir"
By default, \f(CW\*(C`sa\-update\*(C'\fR will use the system-wide rules update directory:
.Sp
.Vb 1
\&        /var/lib/spamassassin/4.000002
.Ve
.Sp
If the updates should be stored in another location, specify it here.
.Sp
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
\&\f(CW\*(C`Makefile.PL\*(C'\fR arguments, instead of overriding sa-update's runtime behaviour.
.IP "\fB\-D\fR [\fIarea,...\fR], \fB\-\-debug\fR [\fIarea,...\fR]" 4
.IX Item "-D [area,...], --debug [area,...]"
Produce debugging output.  If no areas are listed, all debugging information is
printed.  Diagnostic output can also be enabled for each area individually;
\&\fIarea\fR is the area of the code to instrument. For example, to produce
diagnostic output on channel, gpg, and http, use:
.Sp
.Vb 1
\&        sa\-update \-D channel,gpg,http
.Ve
.Sp
For more information about which areas (also known as channels) are
available, please see the documentation at
<https://wiki.apache.org/spamassassin/DebugChannels>.
.IP "\fB\-h\fR, \fB\-\-help\fR" 4
.IX Item "-h, --help"
Print help message and exit.
.IP "\fB\-V\fR, \fB\-\-version\fR" 4
.IX Item "-V, --version"
Print sa-update version and exit.
.SH "EXIT CODES"
.IX Header "EXIT CODES"
In absence of a \-\-checkonly option, an exit code of \f(CW0\fR means:
an update was available, and was downloaded and installed successfully.
If \-\-checkonly was specified, an exit code of \f(CW0\fR means: an update was
available.
.PP
An exit code of \f(CW1\fR means no fresh updates were available.
.PP
An exit code of \f(CW2\fR 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.
.PP
An exit code of \f(CW3\fR means that at least one update succeeded while 
other channels failed.  If using sa-compile, you should proceed with it.
.PP
An exit code of \f(CW4\fR or higher, indicates that errors occurred while
attempting to download and extract updates, and no channels were updated.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBMail::SpamAssassin\fR\|(3)
\&\fBMail::SpamAssassin::Conf\fR\|(3)
\&\fBspamassassin\fR\|(1)
\&\fBspamd\fR\|(1)
<https://wiki.apache.org/spamassassin/RuleUpdates>
.SH "PREREQUISITES"
.IX Header "PREREQUISITES"
\&\f(CW\*(C`Mail::SpamAssassin\*(C'\fR
.SH "BUGS"
.IX Header "BUGS"
See <https://bz.apache.org/SpamAssassin/>
.SH "AUTHORS"
.IX Header "AUTHORS"
The Apache SpamAssassin(tm) Project <https://spamassassin.apache.org/>
.SH "LICENSE AND COPYRIGHT"
.IX Header "LICENSE AND COPYRIGHT"
SpamAssassin is distributed under the Apache License, Version 2.0, as
described in the file \f(CW\*(C`LICENSE\*(C'\fR included with the distribution.
.PP
Copyright (C) 2015 The Apache Software Foundation