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] [ < mailmessagepath ... ]
10
11       spamassassin -d [ < mailmessagepath ... ]
12
13       spamassassin -r [ < mailmessagepath ... ]
14
15       spamassassin -k [ < mailmessagepath ... ]
16
17       spamassassin -W-R [ < mailmessagepath ... ]
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        -x, --nocreate-prefs              Don't create user preferences file
33        -e, --exit-code                   Exit with a non-zero exit code if the
34                                          tested message was spam
35        --mbox                            read in messages in mbox format
36        --mbx                             read in messages in UW mbx format
37        -t, --test-mode                   Pipe message through and add extra
38                                          report to the bottom
39        --lint                            Lint the rule set: report syntax errors
40        -W, --add-to-whitelist            Add addresses in mail to persistent address whitelist
41        --add-to-blacklist                Add addresses in mail to persistent address blacklist
42        -R, --remove-from-whitelist       Remove all addresses found in mail from
43                                          persistent address list
44        --add-addr-to-whitelist=addr      Add addr to persistent address whitelist
45        --add-addr-to-blacklist=addr      Add addr to persistent address blacklist
46        --remove-addr-from-whitelist=addr Remove addr from persistent address list
47        --ipv4only, --ipv4-only, --ipv4   Disable attempted use of ipv6 for DNS
48        --progress                        Print progress bar
49        -D, --debug [area=n,...]          Print debugging messages
50        -V, --version                     Print version
51        -h, --help                        Print usage message
52

DESCRIPTION

54       spamassassin is a simple front-end filter for SpamAssassin.
55
56       Using the SpamAssassin rule base, it uses a wide range of heuristic
57       tests on mail headers and body text to identify "spam", also known as
58       unsolicited bulk email.  Once identified, the mail is then tagged as
59       spam for later filtering using the user's own mail user-agent applica‐
60       tion.
61
62       The default tagging operations that take place are detailed in "TAG‐
63       GING".
64
65       By default, message(s) are read in from STDIN (< mailmessage), or from
66       specified files and directories (path ...)  STDIN and files are assumed
67       to be in file format, with a single message per file.  Directories are
68       assumed to be in a format where each file in the directory contains
69       only one message (directories are not recursed and filenames containing
70       whitespace or beginning with "." or "," are skipped).  The options
71       --mbox and --mbx can override the assumed format, see the appropriate
72       OPTION information below.
73
74       Please note that SpamAssassin is not designed to scan large messages.
75       Don't feed messages larger than about 500 KB to SpamAssassin, as this
76       will consume a huge amount of memory.
77

OPTIONS

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

SEE ALSO

266       sa-learn(1) spamd(1) spamc(1) Mail::SpamAssassin::Conf(3) Mail::SpamAs‐
267       sassin(3)
268

PREREQUISITES

270       "Mail::SpamAssassin"
271

BUGS

273       See <http://issues.apache.org/SpamAssassin/>
274

AUTHORS

276       The SpamAssassin(tm) Project <http://spamassassin.apache.org/>
277
279       SpamAssassin is distributed under the Apache License, Version 2.0, as
280       described in the file "LICENSE" included with the distribution.
281
282
283
284perl v5.8.8                       2008-01-05               spamassassin-run(3)
Impressum