1spamassassin-run(3)   User Contributed Perl Documentation  spamassassin-run(3)
2
3
4

NAME

6       spamassassin - simple front-end filtering script for SpamAssassin
7

SYNOPSIS

9       spamassassin [options] [ < mailmessage | path ... ]
10
11       spamassassin -d [ < mailmessage | path ... ]
12
13       spamassassin -r [ < mailmessage | path ... ]
14
15       spamassassin -k [ < mailmessage | path ... ]
16
17       spamassassin -W|-R [ < mailmessage | path ... ]
18
19       Options:
20
21        -L, --local                       Local tests only (no online tests)
22        -r, --report                      Report message as spam
23        -k, --revoke                      Revoke message as spam
24        -d, --remove-markup               Remove spam reports from a message
25        -C path, --configpath=path, --config-file=path
26                                          Path to standard configuration dir
27        -p prefs, --prefspath=file, --prefs-file=file
28                                          Set user preferences file
29        --siteconfigpath=path             Path for site configs
30                                          (def: /etc/mail/spamassassin)
31        --cf='config line'                Additional line of configuration
32        --pre='config line'               Additional line of ".pre" (prepended to configuration)
33        -x, --nocreate-prefs              Don't create user preferences file
34        -e, --exit-code                   Exit with a non-zero exit code if the
35                                          tested message was spam
36        --mbox                            read in messages in mbox format
37        --mbx                             read in messages in UW mbx format
38        -t, --test-mode                   Pipe message through and add extra
39                                          report to the bottom
40        --lint                            Lint the rule set: report syntax errors
41        -W, --add-to-welcomelist          Add addresses in mail to persistent address welcomelist
42        --add-to-blocklist                Add addresses in mail to persistent address blocklist
43        -R, --remove-from-welcomelist     Remove all addresses found in mail from
44                                          persistent address list
45        --add-addr-to-welcomelist=addr    Add addr to persistent address welcomelist
46        --add-addr-to-blocklist=addr      Add addr to persistent address blocklist
47        --remove-addr-from-welcomelist=addr Remove addr from persistent address list
48        -4 --ipv4only, --ipv4-only, --ipv4 Use IPv4, disable use of IPv6 for DNS etc.
49        -6                                Use IPv6, disable use of IPv4 where possible
50        --progress                        Print progress bar
51        -D, --debug [area,...]            Print debugging messages
52        -V, --version                     Print version
53        -h, --help                        Print usage message
54

DESCRIPTION

56       spamassassin is a simple front-end filter for SpamAssassin.
57
58       Using the SpamAssassin rule base, it uses a wide range of heuristic
59       tests on mail headers and body text to identify "spam", also known as
60       unsolicited bulk email.  Once identified, the mail is then tagged as
61       spam for later filtering using the user's own mail user-agent
62       application.
63
64       The default tagging operations that take place are detailed in
65       "TAGGING" in spamassassin.
66
67       By default, message(s) are read in from STDIN (< mailmessage), or from
68       specified files and directories (path ...)  STDIN and files are assumed
69       to be in file format, with a single message per file.  Directories are
70       assumed to be in a format where each file in the directory contains
71       only one message (directories are not recursed and filenames containing
72       whitespace or beginning with "." or "," are skipped).  The options
73       --mbox and --mbx can override the assumed format, see the appropriate
74       OPTION information below.
75
76       Files compressed with gzip/bzip2/xz/lz4/lzip/lzo are uncompressed
77       automatically.  See "Mail::SpamAssassin::ArchiveIterator" for more
78       details.
79
80       Please note that SpamAssassin is not designed to scan huge messages.
81       Messages larger than ~10-20MB should not be fed to SpamAssassin, as
82       memory consumption will increase rapidly.
83

OPTIONS

85       -e, --error-code, --exit-code
86           Exit with a non-zero error code, if the message is determined to be
87           spam.
88
89       -h, --help
90           Print help message and exit.
91
92       -V, --version
93           Print version and exit.
94
95       -t, --test-mode
96           Test mode.  Pipe message through and add extra report.  Note that
97           the report text assumes that the message is spam, since in normal
98           use it is only visible in this case.  Pay attention to the score
99           instead.
100
101           If you run this with -d, the message will first have SpamAssassin
102           markup removed before being tested.
103
104       -r, --report
105           Report this message as manually-verified spam.  This will submit
106           the mail message read from STDIN to various spam-blocker databases.
107           Currently, these are the Distributed Checksum Clearinghouse
108           "https://www.dcc-servers.net/dcc/", Pyzor "https://www.pyzor.org/",
109           Vipul's Razor "http://razor.sourceforge.net/", and SpamCop
110           "https://www.spamcop.net/".
111
112           If the message contains SpamAssassin markup, the markup will be
113           stripped out automatically before submission.  The support modules
114           for DCC, Pyzor, and Razor must be installed for spam to be reported
115           to each service.  SpamCop reports will have greater effect if you
116           register and set the "spamcop_to_address" option.
117
118           The message will also be submitted to SpamAssassin's learning
119           systems; currently this is the internal Bayesian statistical-
120           filtering system (the BAYES rules).  (Note that if you only want to
121           perform statistical learning, and do not want to report mail to
122           third-parties, you should use the "sa-learn" command directly
123           instead.)
124
125       -k, --revoke
126           Revoke this message.  This will revoke the mail message read from
127           STDIN from various spam-blocker databases.  Currently, these are
128           Vipul's Razor.
129
130           Revocation support for the Distributed Checksum Clearinghouse,
131           Pyzor, and SpamCop is not currently available.
132
133           If the message contains SpamAssassin markup, the markup will be
134           stripped out automatically before submission.  The support modules
135           for Razor must be installed for spam to be revoked from the
136           service.
137
138           The message will also be submitted as 'ham' (non-spam) to
139           SpamAssassin's learning systems; currently this is the internal
140           Bayesian statistical-filtering system (the BAYES rules).  (Note
141           that if you only want to perform statistical learning, and do not
142           want to report mail to third-parties, you should use the "sa-learn"
143           command directly instead.)
144
145       --lint
146           Syntax check (lint) the rule set and configuration files, reporting
147           typos and rules that do not compile correctly.  Exits with 0 if
148           there are no errors, or greater than 0 if any errors are found.
149
150       -W, --add-to-welcomelist
151           Previously --add-to-whitelist which will work interchangeably until
152           4.1.
153
154           Add all email addresses, in the headers and body of the mail
155           message read from STDIN, to a persistent address welcomelist.  Note
156           that you must be running "spamassassin" or "spamd" with a
157           persistent address list plugin enabled for this to work.
158
159       --add-to-blocklist
160           Previously --add-to-blacklist which will work interchangeably until
161           4.1.
162
163           Add all email addresses, in the headers and body of the mail
164           message read from STDIN, to the persistent address blocklist.  Note
165           that you must be running "spamassassin" or "spamd" with a
166           persistent address list plugin enabled for this to work.
167
168       -R, --remove-from-welcomelist
169           Previously --remove-from-whitelist which will work interchangeably
170           until 4.1.
171
172           Remove all email addresses, in the headers and body of the mail
173           message read from STDIN, from a persistent address list. STDIN must
174           contain a full email message, so to remove a single address you
175           should use --remove-addr-from-welcomelist instead.
176
177           Note that you must be running "spamassassin" or "spamd" with a
178           persistent address list plugin enabled for this to work.
179
180       --add-addr-to-welcomelist
181           Previously --add-addr-to-whitelist which will work interchangeably
182           until 4.1.
183
184           Add the named email address to a persistent address welcomelist.
185           Note that you must be running "spamassassin" or "spamd" with a
186           persistent address list plugin enabled for this to work.
187
188       --add-addr-to-blocklist
189           Previously --add-addr-to-blacklist which will work interchangeably
190           until 4.1.
191
192           Add the named email address to a persistent address blocklist.
193           Note that you must be running "spamassassin" or "spamd" with a
194           persistent address list plugin enabled for this to work.
195
196       --remove-addr-from-welcomelist
197           Previously --remove-addr-from-whitelist which will work
198           interchangeably until 4.1.
199
200           Remove the named email address from a persistent address
201           welcomelist.  Note that you must be running "spamassassin" or
202           "spamd" with a persistent address list plugin enabled for this to
203           work.
204
205        --ipv4only, --ipv4-only, --ipv4
206           Do not use IPv6 for DNS tests. Normally, SpamAssassin will try to
207           detect if IPv6 is available, using only IPv4 if it is not. Use if
208           the existing tests for IPv6 availability produce incorrect results
209           or crashes.
210
211       -L, --local
212           Do only the ''local'' tests, ones that do not require an internet
213           connection to operate.  Normally, SpamAssassin will try to detect
214           whether you are connected to the net before doing these tests
215           anyway, but for faster checks you may wish to use this.
216
217           Note that SpamAssassin's network rules are run in parallel.  This
218           can cause overhead in terms of the number of file descriptors
219           required if --local is not used; it is recommended that the minimum
220           limit on fds be raised to at least 256 for safety.
221
222       -d, --remove-markup
223           Remove SpamAssassin markup (the "SpamAssassin results" report,
224           X-Spam-Status headers, etc.) from the mail message.  The resulting
225           message, which will be more or less identical to the original, pre-
226           SpamAssassin input, will be output to STDOUT.
227
228           (Note: the message will not be exactly identical; some headers will
229           be reformatted due to some features of the Mail::Internet package,
230           but the body text will be.)
231
232       -C path, --configpath=path, --config-file=path
233           Use the specified path for locating the distributed configuration
234           files.  Ignore the default directories (usually
235           "/usr/share/spamassassin" or similar).
236
237       --siteconfigpath=path
238           Use the specified path for locating site-specific configuration
239           files.  Ignore the default directories (usually
240           "/etc/mail/spamassassin" or similar).
241
242       --cf='config line'
243           Add additional lines of configuration directly from the command-
244           line, parsed after the configuration files are read.   Multiple
245           --cf arguments can be used, and each will be considered a separate
246           line of configuration.  For example:
247
248                   spamassassin -t --cf="body NEWRULE /text/" --cf="score NEWRULE 3.0"
249
250       --pre='config line'
251           Add additional lines of .pre configuration directly from the
252           command-line, parsed before the configuration files are read.
253           Multiple --pre arguments can be used, and each will be considered a
254           separate line of configuration.  For example:
255
256                   spamassassin -t --pre="loadplugin Mail::SpamAssassin::Plugin::Foobar"
257
258       -p prefs, --prefspath=prefs, --prefs-file=prefs
259           Read user score preferences from prefs (usually
260           "$HOME/.spamassassin/user_prefs").
261
262       --progress
263           Prints a progress bar (to STDERR) showing the current progress.
264           This option will only be useful if you are redirecting STDOUT (and
265           not STDERR).  In the case where no valid terminal is found this
266           option will behave very much like the --showdots option in other
267           SpamAssassin programs.
268
269       -D [area,...], --debug [area,...]
270           Produce debugging output. If no areas are listed, all debugging
271           information is printed. Diagnostic output can also be enabled for
272           each area individually; area is the area of the code to instrument.
273           For example, to produce diagnostic output on bayes, learn, and dns,
274           use:
275
276                   spamassassin -D bayes,learn,dns
277
278           Use an empty string (-D '') to indicate no areas when the next item
279           on the command line is a path, to prevent the path from being
280           parsed as an area.
281
282           Higher priority informational messages that are suitable for
283           logging in normal circumstances are available with an area of
284           "info".
285
286           For more information about which areas (also known as channels) are
287           available, please see the documentation at:
288
289                   L<https://wiki.apache.org/spamassassin/DebugChannels>
290
291       -x, --nocreate-prefs
292           Disable creation of user preferences file.
293
294       --mbox
295           Specify that the input message(s) are in mbox format.  mbox is a
296           standard Unix message folder format.
297
298       --mbx
299           Specify that the input message(s) are in UW .mbx format.  mbx is
300           the mailbox format used within the University of Washington's IMAP
301           implementation; see "https://en.wikipedia.org/wiki/UW_IMAP".
302

SEE ALSO

304       sa-learn(1) spamd(1) spamc(1) Mail::SpamAssassin::Conf(3)
305       Mail::SpamAssassin(3)
306

PREREQUISITES

308       "Mail::SpamAssassin"
309

BUGS

311       See <https://issues.apache.org/SpamAssassin/>
312

AUTHORS

314       The SpamAssassin(tm) Project <https://spamassassin.apache.org/>
315
317       SpamAssassin is distributed under the Apache License, Version 2.0, as
318       described in the file "LICENSE" included with the distribution.
319
320
321
322perl v5.38.0                      2023-07-22               spamassassin-run(3)
Impressum