Rev 4 | Rev 13 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | magnus | 1 | # Options for spamassassin running in exim's local_scan (SA Exim) |
2 | # By Marc MERLIN <marc_soft@merlins.org> - Initial version: April 2002 |
||
3 | # Sander Smeenk <ssmeenk@freshdot.net> - Improvements: March 2004 |
||
4 | # |
||
5 | # Sample file version 1.16 for SA-Exim 4.1 - 2005/01/10 |
||
6 | # |
||
7 | # The parse routine is minimalistic. It expects "option: value" (exactly |
||
8 | # one space after the colon, and none before). You should put long lines |
||
9 | # on one line. The parser isn't capable of parsing multiline values. |
||
10 | # |
||
11 | # SA threshold values are parsed as floats and other numerical options |
||
12 | # are ints. String options have to be set. To unset them, comment out the |
||
13 | # variable, don't set it to nothing. |
||
14 | # |
||
15 | # READ THIS: |
||
16 | # --------- |
||
17 | # Watch your logs, you will get errors and your messages will get |
||
18 | # temporarily bounced if expansions fail. Watch your logs! |
||
19 | # |
||
20 | # If you are afraid that spammers might use a header that is used here |
||
21 | # as a default, have exim set it to another value than 'Yes' and check |
||
22 | # here for that other value. |
||
23 | # |
||
24 | # For every expansion, anything that doesn't expand to "" or "0" |
||
25 | # (without quotes) will be considered true. If you set the string to 1, |
||
26 | # it will be true without going through exim's condition evaluator (and |
||
27 | # if you leave it unset, it will default to 0) |
||
28 | # |
||
29 | # You should not put double quotes around expressions! |
||
30 | # --- snip --- |
||
31 | |||
32 | # Enable basic verbose output by default. Watch your logs! |
||
33 | SAEximDebug: 1 |
||
34 | |||
35 | |||
36 | # Default path is /usr/bin/spamc, but you can change it here |
||
37 | SAspamcpath: /usr/bin/spamc |
||
38 | |||
39 | # Which characters are retained from a Message-Id header (for safety, we |
||
40 | # remove characters that might cause problems with shell parsing) |
||
41 | # Change the default at your own risk (you also have to change this in |
||
42 | # the SA greylisting patch if you use that) |
||
43 | #SAsafemesgidchars: !#%( )*+,-.0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~ |
||
44 | |||
45 | # If SAspamcSockPath is set spamc uses socket to connect to spamd, |
||
46 | # use --socketpath pathname as argument to spamd (new in SA 2.60). |
||
47 | # Leave it unset if you want spamc to connect(AF_INET) to spamd at |
||
48 | # 127.0.0.1 (this is the default shown in the options below), but if |
||
49 | # you set it, it will override the two TCP connect options below |
||
50 | #SAspamcSockPath: /var/run/spamd.sock |
||
51 | |||
52 | # SAspamcHost / SAspamcPort: TCP socket where your spamd is listening |
||
53 | # Shown below are the defaults: |
||
54 | SAspamcHost: 127.0.0.1 |
||
55 | SAspamcPort: 783 |
||
56 | |||
57 | |||
58 | # Exim configuration string to run before running SA against the message |
||
59 | # This decides whether SA gets run against the message or not. This |
||
60 | # default will not reject messages if the message had SA headers but |
||
61 | # they weren't added by us. |
||
6 | magnus | 62 | SAEximRunCond: ${if and {{def:sender_host_address} {!eq {$sender_host_address}{127.0.0.1}} {!eq {$sender_host_address}{::1}}}} |
63 | # If you want more detailed control over when to run SA, it's recommended |
||
64 | # that you set an ACL variable indicating this from the acl section of |
||
65 | # your Exim configuration file. The current maintainer sets acl_m0 to |
||
66 | # "noscan" if the sending host is localhost or has authenticated. |
||
67 | #SAEximRunCond: ${if !eq{$acl_m0}{noscan}} |
||
68 | # (This means exactly the same as ${if !eq{$acl_m0}{noscan} {true}{}}, |
||
69 | # where the empty string is considered false.) |
||
70 | |||
71 | #---------------------------------------------------------------------- |
||
72 | # Remove or comment out the following line to enable sa-exim |
||
1 | magnus | 73 | SAEximRunCond: 0 |
6 | magnus | 74 | #---------------------------------------------------------------------- |
1 | magnus | 75 | |
76 | # If and only if SAEximRunCond was true, and we did run SA, this |
||
77 | # expression decides whether we actually consider acting upon SAdevnull, |
||
78 | # SApermreject, and SAtempreject if you have them set. |
||
79 | # |
||
80 | # Use this to tag messages that you shouldn't reject (messages sent to |
||
81 | # abuse or postmaster for instance). |
||
82 | # |
||
6 | magnus | 83 | # As an example, set acl_m0 to "canreject" if a recipient other than |
84 | # postmaster or abuse is encountered (and the sender isn't local). That |
||
85 | # way, spammers can't circumvent blocking by sending to postmaster and |
||
86 | # 99 other recipients. (If acl_m0 is taken, you'll of course have to use |
||
87 | # a different variable. |
||
88 | #SAEximRejCond: ${if eq{$acl_m0}{canreject}} |
||
1 | magnus | 89 | |
90 | |||
91 | # How much of the body we feed to spamassassin (in bytes) |
||
92 | # Default is 250KB |
||
93 | SAmaxbody: 256000 |
||
94 | |||
95 | # Do you want to feed SAmaxbody's worth of the message body if it is too big? |
||
96 | # Either, you skip messages that are too big and not scan them, or you can |
||
97 | # truncate the body and feed that to SA. |
||
98 | # Note that SA will sometimes raise the spam score if it can't parse |
||
99 | # the message correctly (since the end is missing, decoding will fail) |
||
100 | # Default is 0: do not scan messages that are too big |
||
101 | # (note that this is parsed as a condition) |
||
102 | SATruncBodyCond: 0 |
||
103 | |||
104 | # If you want SA to report_safe you need sa-exim to rewrite the body of |
||
105 | # the message since SA encapsulates the spam as a mime attachment. |
||
106 | # You probably want SATruncBodyCond to be 0 or else you'll end up with a |
||
107 | # partial message if it's larger than SAmaxbody and it's spam |
||
108 | # |
||
109 | # Also note that if you enable this option, any saved message will be saved |
||
110 | # after the body has been modified by SA. |
||
111 | # (this is not a condition as SA's report_safe is not conditional) |
||
112 | SARewriteBody: 0 |
||
113 | |||
114 | # Prepend saved messages with an fake From-header to make the file look like a |
||
115 | # valid mbox file |
||
116 | SAPrependArchiveWithFrom: 1 |
||
117 | |||
118 | # If you are archiving messages that are rejected, how much do you want |
||
119 | # to archive? Default is 20MB. |
||
120 | SAmaxarchivebody: 20971520 |
||
121 | |||
122 | # On errors, if you are saving messages, you probably want the entire message |
||
123 | # Default size saved (if you are saving errors) is 1GB |
||
124 | SAerrmaxarchivebody: 1073741824 |
||
125 | |||
126 | # You can have SA-Exim add a X-SA-Exim-Rcpt-To header, which will list all |
||
127 | # the recipients for the Email, unless the list gets bigger than |
||
128 | # SAmaxrcptlistlength bytes. |
||
129 | # The default value of 0 disables the header for privacy reasons (the header |
||
130 | # exposes Bcced recipients) |
||
131 | # Any value bigger than 8000 will be ignored because there is a limit on the |
||
132 | # size of headers that you can have and exim's string_sprintf |
||
133 | # Note that if you are planning to use greylisting, you should set this |
||
134 | # value to 8000 since SA's greylisting code needs the recipients. |
||
135 | SAmaxrcptlistlength: 0 |
||
136 | |||
137 | # Add X-SA-Exim-Rcpt-To and X-SA-Exim-Mail-From headers before SA scans |
||
138 | # the message. |
||
139 | # If this option is enabled, SARewiteBody is true, and safe_mode is |
||
140 | # enabled in SA, you end up with the X-SA-Exim-Rcpt-To/X-SA-Exim-Mail-From in |
||
141 | # the attatched message as well without the ability to remove them later in an |
||
142 | # exim transport (think privacy). |
||
143 | # In real life this is usually not a problem because the message is spam anyway, |
||
144 | # and if you turn this off, you lose the option to use those headers to score |
||
145 | # the message with SA. |
||
146 | SAaddSAEheaderBeforeSA: 1 |
||
147 | |||
148 | # How many seconds you want to allow spamc to run. Exim 4.04 and better will |
||
149 | # kill us after a default of 5 minutes. This however is not great, because the |
||
150 | # mail gets temporarily rejected |
||
151 | # You should set this and have SA Exim handle the timeout itself and accept the |
||
152 | # message if spamc takes too long (instead of timing out) |
||
153 | # A value of 0 means no timeout, and we run until exim stops us. |
||
154 | # I know of at least one mail server (nanog's merit.edu) that will not |
||
155 | # wait a full 5mn (which causes tempreject and resends), so the default is 4mn |
||
156 | #SAtimeout: 240 |
||
157 | |||
158 | # Do you want to save mails that were accepted because spamc timed out? |
||
159 | # Specify a directory to enable the feature. |
||
160 | # SA-Exim will try to create the directory if it has the permissions to do so, |
||
161 | # check your maillog for failures (or create the directory yourself and make it |
||
162 | # writeable by exim) |
||
163 | SAtimeoutsave: /var/spool/exim/SAtimeoutsave |
||
164 | |||
165 | # You can optionally save or not save messages that matched the above rule |
||
166 | SAtimeoutSavCond: 1 |
||
167 | |||
168 | |||
169 | # You should really create this directory for local_scan to save messages that |
||
170 | # created an error. If you don't want this, comment out this variable |
||
171 | # Make sure all these directories are owned by the exim user |
||
172 | # SA-Exim will try to create the directory if it has the permissions to do |
||
173 | # so, check your maillog for failures (or create the directory yourself and |
||
174 | # make it writeable by exim) |
||
175 | SAerrorsave: /var/spool/exim/SAerrorsave |
||
176 | |||
177 | # You can optionally save or not save messages that matched the above rule |
||
178 | # You should not put double quotes around the expression |
||
179 | SAerrorSavCond: 1 |
||
180 | |||
181 | # If you set to 1, SA will temporarily reject messages that generated an error |
||
182 | # while they were processed (they'll still be saved if SAerrorsave is set). |
||
183 | # Otherwise (0 = false), the messages are just accepted, which seems like a |
||
184 | # more sensible default |
||
185 | SAtemprejectonerror: 0 |
||
186 | |||
187 | |||
188 | ############################################################################### |
||
189 | # NOTE: Spamd needs to tell sa-exim that the message SA-Exim gave spamd |
||
190 | # is spam before sa-exim will consider the SA tresholds. |
||
191 | # In other words, you cannot reject mails on SA scores if you set that |
||
192 | # threshold to a lower threshold than SA's required_hits value. |
||
193 | # The one exception to this rule is SAtempreject (in order to let you |
||
194 | # temporarily reject mail when you are doing greylisting, see |
||
195 | # README.greylisting in the documentation for details) |
||
196 | ############################################################################### |
||
197 | |||
198 | # SA score when you start stalling the sender by sending many continuation |
||
199 | # lines for up to SAteergrubetime |
||
200 | # This is now a string (without quotes) that gets evaluated at runtime by exim |
||
201 | # but you can still assign a simple float value to it |
||
202 | # Note that this is an obvious abuse of SMTP, but eh, they started it :-) |
||
203 | # Of course, this means that each incoming spam with the right score threshold |
||
204 | # will keep an exim process busy on your machine. Make sure you can afford it. |
||
205 | # Default value is 2^20, which should disable the behavior |
||
206 | |||
207 | # Please, don't teergrube people who relay for you or your own MXes :-) |
||
208 | # This option is left behind for backward compatibility, but you can now |
||
209 | # get the same result by putting a condition string in SAteergrube |
||
210 | # The trick is to list your score if the condition succeeds, and a really |
||
211 | # high score otherwise. |
||
212 | #SAteergrube: ${if and { {!eq {$sender_host_address}{127.0.0.1}} {!eq {$sender_host_address}{127.0.0.2}} } {25}{1048576}} |
||
213 | |||
214 | # SAteergrubecond is deprecated (replaced by SAteergrube) |
||
215 | # You used to be say whether you would apply the teergrubing score with this |
||
216 | # condition, but now that scores are conditions, it is obsolete |
||
217 | #SAteergrubecond: ${if and { {!eq {$sender_host_address}{127.0.0.1}} {!eq {$sender_host_address}{127.0.0.2}} } {1}{0}} |
||
218 | |||
219 | # How long do you want to stall the sender (in seconds) |
||
220 | # If you set the value too high, you might get too many exim processes running |
||
221 | # and run out of process slots |
||
222 | # Remember, don't come crying if playing with this "feature" causes your mail |
||
223 | # server to catch fire :-) |
||
224 | SAteergrubetime: 900 |
||
225 | |||
226 | # You can optionally save or not save messages that matched the above rule |
||
227 | SAteergrubeSavCond: 1 |
||
228 | |||
229 | # Do you want to save mails that you stalled for later analysis? |
||
230 | # Specify a directory to enable the feature. |
||
231 | # SA-Exim will try to create the directory if it has the permissions to do so, |
||
232 | # check your maillog for failures (or create the directory yourself and make it |
||
233 | # writeable by exim) |
||
234 | SAteergrubesave: /var/spool/exim/SAteergrube |
||
235 | |||
236 | # When you stall the sender, you will probably get the mail again. |
||
237 | # By default, we'll only save messages by message ID so that we don't save |
||
238 | # multiple copies every time the sender tries again. |
||
239 | # Of course, this means someone could fake someone else's message ID to |
||
240 | # overwrite the saved copy of another spam. Such is life :-) |
||
241 | SAteergrubeoverwrite: 1 |
||
242 | |||
243 | |||
244 | |||
245 | # If you reach this score, the mail is accepted and tossed (/dev/nulled). |
||
246 | # The default value is 2^20 which should ensure this never happens. |
||
247 | # This is now a string (without quotes) that gets evaluated at runtime by exim |
||
248 | # but you can still assign a simple float value to it |
||
249 | # You should be really sure that the message is spam because the sender will |
||
250 | # get no notification |
||
251 | #SAdevnull: 20.0 |
||
252 | |||
253 | # You can optionally save or not save messages that matched the above rule |
||
254 | SAdevnullSavCond: 1 |
||
255 | |||
256 | # Do you want to save mails that are tossed? |
||
257 | # Specify a directory to enable the feature. |
||
258 | # This is just in case you do want to keep a copy of the alledge spams somewhere |
||
259 | # Messages are saved by unixdate_Message-Id or just unix date if there is no |
||
260 | # Message-Id. |
||
261 | # SA-Exim will try to create the directory if it has the permissions to do so, |
||
262 | # check your maillog for failures (or create the directory yourself and make it |
||
263 | # writeable by exim) |
||
264 | SAdevnullsave: /var/spool/exim/SAdevnull |
||
265 | |||
266 | |||
267 | |||
268 | # SA score when you start rejecting Emails (this is better than the above as |
||
269 | # it can notify the sender in case you reject non-spam by mistake) |
||
270 | # This is now a string (without quotes) that gets evaluated at runtime by exim |
||
271 | # but you can still assign a simple float value to it |
||
272 | # Default value is 2^20, which should disable the behavior if you comment out |
||
273 | # the line below |
||
274 | SApermreject: 12.0 |
||
275 | |||
276 | # You can optionally save or not save messages that matched the above rule |
||
277 | SApermrejectSavCond: 1 |
||
278 | |||
279 | # Do you want to save mails that are rejected? |
||
280 | # Specify a directory to enable the feature. |
||
281 | # SA-Exim will try to create the directory if it has the permissions to do so, |
||
282 | # check your maillog for failures (or create the directory yourself and make it |
||
283 | # writeable by exim) |
||
284 | SApermrejectsave: /var/spool/exim/SApermreject |
||
285 | |||
286 | |||
287 | |||
288 | # SA score when you start returning a temporary reject. |
||
289 | # There are few reasons to use this, except if you're reading your tempreject |
||
290 | # save folder (see below) and ajusting scores on the fly, or if you are using |
||
291 | # greylisting |
||
292 | # This is now a string (without quotes) that gets evaluated at runtime by exim |
||
293 | # but you can still assign a simple float value to it |
||
294 | # Default value is 2^20, which should disable the behavior |
||
4 | magnus | 295 | #SAtempreject: 9.0 |
1 | magnus | 296 | |
297 | # You can optionally save or not save messages that matched the above rule |
||
298 | SAtemprejectSavCond: 1 |
||
299 | |||
300 | # Do you want to save mails that are temporarily rejected? |
||
301 | # Specify a directory to enable the feature. |
||
302 | # You could use this to analyse what SA is bouncing and adding an allow rule |
||
303 | # to accept the mail next time it is sent back to you |
||
304 | # SA-Exim will try to create the directory if it has the permissions to do so, |
||
305 | # check your maillog for failures (or create the directory yourself and make it |
||
306 | # writeable by exim) |
||
307 | SAtemprejectsave: /var/spool/exim/SAtempreject |
||
308 | |||
309 | # When you send back a temp reject code, you will get the mail again. |
||
310 | # By default, we'll only save messages by message ID so that we don't save |
||
311 | # multiple copies every time the sender tries again. |
||
312 | # Of course, this means someone could fake someone else's message ID to |
||
313 | # overwrite the saved copy of another spam. Such is life :-) |
||
314 | SAtemprejectoverwrite: 1 |
||
315 | |||
316 | # See README.greylisting in the documentation for the following options |
||
317 | # This is the string that SpamAssassin adds if the message is whitelisted |
||
318 | # We use this to optionally increase the score needed for a tempreject |
||
319 | # (in order to let a message through when it would otherwise have been |
||
320 | # temprejected) |
||
321 | # Default value is "GREYLIST_ISWHITE" (as used in the patch provided by SA-Exim) |
||
322 | SAgreylistiswhitestr: GREYLIST_ISWHITE |
||
323 | |||
324 | # By how much do we temporarly raise tempreject to allow a mail in when it |
||
325 | # would otherwise have been temp rejected (because SA flagged it was whitelisted |
||
326 | # by the greylisting code provided as a patch to SA in the SA-Exim distro) |
||
327 | # Note that greylisting will not work in until you patch SA with the greylist |
||
328 | # function |
||
329 | # Note that you most likely want |
||
330 | # SAtempreject + SAgreylistraisetempreject <= SApermreject |
||
331 | # Default value is 3.0 but you'd probably to lower the tempreject score and |
||
332 | # increase this one (see README.greylisting) |
||
333 | SAgreylistraisetempreject: 3.0 |
||
334 | |||
335 | |||
336 | # Do you want to save mails that are flagged as spam by SA, but not rejected by |
||
337 | # any of the above thresholds? Specify a directory to enable the feature. |
||
338 | # That's one way to track mails thare are going through even though they were |
||
339 | # flagged by SA (note that you could also save them in exim's system_filter, |
||
340 | # although copies saved here happen before exim makes modification to the |
||
341 | # message like rewriting) |
||
342 | # SA-Exim will try to create the directory if it has the permissions to do so, |
||
343 | # check your maillog for failures (or create the directory yourself and make it |
||
344 | # writeable by exim) |
||
345 | SAspamacceptsave: /var/spool/exim/SAspamaccept |
||
346 | |||
347 | # You can control which messages you want saved if you only want a subset |
||
348 | SAspamacceptSavCond: 0 |
||
349 | |||
350 | |||
351 | # Do you want to save mails that are not flagged as spam by SA |
||
352 | # Specify a directory to enable the feature. |
||
353 | # This is only here for completeness, if you want to save all messages not |
||
354 | # flagged as spam by SA (you could also do this in system_filter) |
||
355 | # SA-Exim will try to create the directory if it has the permissions to do so, |
||
356 | # check your maillog for failures (or create the directory yourself and make it |
||
357 | # writeable by exim) |
||
358 | SAnotspamsave: /var/spool/exim/SAnotspam |
||
359 | |||
360 | # You can control which messages you want saved if you only want a subset |
||
361 | SAnotspamSavCond: 0 |
||
362 | |||
363 | # All the following strings can take one '%s' which will be replaced by |
||
364 | # spamstatus: "SA score, trigger score" |
||
365 | SAmsgteergrubewait: Wait for more output |
||
366 | SAmsgteergruberej: Please try again later |
||
367 | SAmsgpermrej: Rejected |
||
368 | SAmsgtemprej: Please try again later |
||
369 | # This string is a static string, do not include "%s" |
||
370 | SAmsgerror: Temporary local error while processing message, please contact postmaster. |