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: /usr/etc/mail/spamassassin)
22 --updatedir=path Directory to place updates
23 (default: /var/lib/spamassassin/compiled/<perlversion>/3.004002)
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
31 SpamAssassin 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
35 "Mail::SpamAssassin::Plugin::Rule2XSBody" plugin to speed up
36 SpamAssassin's operation, where possible, and when that plugin is
37 loaded.
38
39 "re2c" can match strings much faster than perl code, by constructing a
40 DFA to match many simple strings in parallel, and compiling that to
41 native object code. Not all SpamAssassin rules are amenable to this
42 conversion, however.
43
44 This requires "re2c" (see "http://re2c.org/"), and the C compiler used
45 to build Perl XS modules, be installed.
46
47 Note that running this, and creating a compiled ruleset, will have no
48 effect on SpamAssassin scanning speeds unless you also edit your
49 "v320.pre" file and ensure this line is uncommented:
50
51 loadplugin Mail::SpamAssassin::Plugin::Rule2XSBody
52
53 Additionally, "sa-compile" will not restart "spamd" or otherwise cause
54 a scanner to reload the now-compiled ruleset automatically.
55
57 --list
58 Output the extracted base strings to STDOUT, instead of generating
59 the C extension code.
60
61 --sudo
62 Use sudo(8) to run code as 'root' when writing files to the
63 compiled-rules storage area (which is
64 "/var/lib/spamassassin/compiled/5.030/3.004002" by default).
65
66 --quiet
67 Produce less diagnostic output. Errors will still be displayed.
68
69 --keep-tmps
70 Keep temporary files after the script completes, instead of
71 deleting them.
72
73 -C path, --configpath=path, --config-file=path
74 Use the specified path for locating the distributed configuration
75 files. Ignore the default directories (usually
76 "/usr/share/spamassassin" or similar).
77
78 --siteconfigpath=path
79 Use the specified path for locating site-specific configuration
80 files. Ignore the default directories (usually
81 "/etc/mail/spamassassin" or similar).
82
83 --updatedir
84 By default, "sa-compile" will use the system-wide rules update
85 directory:
86
87 /var/lib/spamassassin/compiled/5.030/3.004002
88
89 If the updates should be stored in another location, specify it
90 here.
91
92 Note that use of this option is not recommended; if sa-compile is
93 placing the compiled rules the wrong directory, you probably need
94 to rebuild SpamAssassin with different "Makefile.PL" arguments,
95 instead of overriding sa-compile's runtime behaviour.
96
97 --cf='config line'
98 Add additional lines of configuration directly from the command-
99 line, parsed after the configuration files are read. Multiple
100 --cf arguments can be used, and each will be considered a separate
101 line of configuration.
102
103 -p prefs, --prefspath=prefs, --prefs-file=prefs
104 Read user score preferences from prefs (usually
105 "$HOME/.spamassassin/user_prefs") .
106
107 -D [area,...], --debug [area,...]
108 Produce debugging output. If no areas are listed, all debugging
109 information is printed. Diagnostic output can also be enabled for
110 each area individually; area is the area of the code to instrument.
111
112 For more information about which areas (also known as channels) are
113 available, please see the documentation at
114 <http://wiki.apache.org/spamassassin/DebugChannels>.
115
116 -h, --help
117 Print help message and exit.
118
119 -V, --version
120 Print sa-compile version and exit.
121
123 Mail::SpamAssassin(3) spamassassin(1) spamd(1)
124
126 "Mail::SpamAssassin" "re2c" "Mail::SpamAssassin::Plugin::Rule2XSBody"
127
129 See <http://issues.apache.org/SpamAssassin/>
130
132 The Apache SpamAssassin(tm) Project <http://spamassassin.apache.org/>
133
135 SpamAssassin is distributed under the Apache License, Version 2.0, as
136 described in the file "LICENSE" included with the distribution.
137
138 Copyright (C) 2015 The Apache Software Foundation
139
140
141
142perl v5.30.0 2019-10-01 SA-COMPILE(1)