1SA-COMPILE(1) User Contributed Perl Documentation SA-COMPILE(1)
2
3
4
6 sa-compile - compile SpamAssassin ruleset into native code
7
9 sa-compile [options]
10
11 Options:
12
13 --list Output base string list to STDOUT
14 --sudo Use 'sudo' for privilege escalation
15 --keep-tmps Keep temporary files instead of deleting
16 -C path, --configpath=path, --config-file=path
17 Path to standard configuration dir
18 -p prefs, --prefspath=file, --prefs-file=file
19 Set user preferences file
20 --siteconfigpath=path Path for site configs
21 (default: /etc/mail/spamassassin)
22 --updatedir=path Directory to place updates
23 (default: /var/lib/spamassassin/compiled/<version>)
24 --cf='config line' Additional line of configuration
25 -D, --debug [area=n,...] Print debugging messages
26 -V, --version Print version
27 -h, --help Print usage message
28
30 sa-compile uses "re2c" to compile the site-wide parts of the SpamAssas‐
31 sin ruleset. No part of user_prefs or any files included from
32 user_prefs can be built into the compiled set.
33
34 This compiled set is then used by the "Mail::SpamAssassin::Plug‐
35 in::Rule2XSBody" plugin to speed up SpamAssassin's operation, where
36 possible, and when that plugin is loaded.
37
38 "re2c" can match strings much faster than perl code, by constructing a
39 DFA to match many simple strings in parallel, and compiling that to
40 native object code. Not all SpamAssassin rules are amenable to this
41 conversion, however.
42
43 This requires "re2c" (see "http://re2c.org/"), and the C compiler used
44 to build Perl XS modules, be installed.
45
46 Note that running this, and creating a compiled ruleset, will have no
47 effect on SpamAssassin scanning speeds unless you also edit your
48 "v320.pre" file and ensure this line is uncommented:
49
50 loadplugin Mail::SpamAssassin::Plugin::Rule2XSBody
51
53 --list
54 Output the extracted base strings to STDOUT, instead of generating
55 the C extension code.
56
57 --sudo
58 Use sudo(8) to run code as 'root' when writing files to the com‐
59 piled-rules storage area (which is "/var/lib/spamassassin/com‐
60 piled/3.002004" by default).
61
62 --keep-tmps
63 Keep temporary files after the script completes, instead of delet‐
64 ing them.
65
66 -C path, --configpath=path, --config-file=path
67 Use the specified path for locating the distributed configuration
68 files. Ignore the default directories (usually "/usr/share/spamas‐
69 sassin" or similar).
70
71 --siteconfigpath=path
72 Use the specified path for locating site-specific configuration
73 files. Ignore the default directories (usually "/etc/mail/spamas‐
74 sassin" or similar).
75
76 --updatedir
77 By default, "sa-compile" will use the system-wide rules update
78 directory:
79
80 /var/lib/spamassassin/spamassassin/compiled/3.002004
81
82 If the updates should be stored in another location, specify it
83 here.
84
85 Note that use of this option is not recommended; if sa-compile is
86 placing the compiled rules the wrong directory, you probably need
87 to rebuild SpamAssassin with different "Makefile.PL" arguments,
88 instead of overriding sa-compile's runtime behaviour.
89
90 --cf='config line'
91 Add additional lines of configuration directly from the com‐
92 mand-line, parsed after the configuration files are read. Multi‐
93 ple --cf arguments can be used, and each will be considered a sepa‐
94 rate line of configuration.
95
96 -p prefs, --prefspath=prefs, --prefs-file=prefs
97 Read user score preferences from prefs (usually "$HOME/.spamassas‐
98 sin/user_prefs") .
99
100 -D [area,...], --debug [area,...]
101 Produce debugging output. If no areas are listed, all debugging
102 information is printed. Diagnostic output can also be enabled for
103 each area individually; area is the area of the code to instrument.
104
105 For more information about which areas (also known as channels) are
106 available, please see the documentation at
107 <http://wiki.apache.org/spamassassin/DebugChannels>.
108
109 -h, --help
110 Print help message and exit.
111
112 -V, --version
113 Print sa-compile version and exit.
114
116 Mail::SpamAssassin(3) spamassassin(1) spamd(1)
117
119 "Mail::SpamAssassin" "re2c" "Mail::SpamAssassin::Plugin::Rule2XSBody"
120
122 See <http://issues.apache.org/SpamAssassin/>
123
125 The Apache SpamAssassin(tm) Project <http://spamassassin.apache.org/>
126
128 SpamAssassin is distributed under the Apache License, Version 2.0, as
129 described in the file "LICENSE" included with the distribution.
130
131
132
133perl v5.8.8 2008-01-29 SA-COMPILE(1)