Lines 6-12
Mail::SpamAssassin::Conf - SpamAssassin
Link Here
|
6 |
|
6 |
|
7 |
# a comment |
7 |
# a comment |
8 |
|
8 |
|
9 |
rewrite_subject 1 |
9 |
tag_header subject from |
10 |
|
10 |
|
11 |
full PARA_A_2_C_OF_1618 /Paragraph .a.{0,10}2.{0,10}C. of S. 1618/i |
11 |
full PARA_A_2_C_OF_1618 /Paragraph .a.{0,10}2.{0,10}C. of S. 1618/i |
12 |
describe PARA_A_2_C_OF_1618 Claims compliance with senate bill 1618 |
12 |
describe PARA_A_2_C_OF_1618 Claims compliance with senate bill 1618 |
Lines 120-129
sub new {
Link Here
|
120 |
$self->{auto_whitelist_file_mode} = '0600'; # as string, with --x bits |
120 |
$self->{auto_whitelist_file_mode} = '0600'; # as string, with --x bits |
121 |
$self->{auto_whitelist_factor} = 0.5; |
121 |
$self->{auto_whitelist_factor} = 0.5; |
122 |
|
122 |
|
123 |
$self->{rewrite_subject} = 1; |
123 |
$self->{tag_header} = ['Subject']; |
|
|
124 |
$self->{tag_header_string} = '*****SPAM*****'; |
124 |
$self->{spam_level_stars} = 1; |
125 |
$self->{spam_level_stars} = 1; |
125 |
$self->{spam_level_char} = '*'; |
126 |
$self->{spam_level_char} = '*'; |
126 |
$self->{subject_tag} = '*****SPAM*****'; |
|
|
127 |
$self->{report_header} = 0; |
127 |
$self->{report_header} = 0; |
128 |
$self->{use_terse_report} = 0; |
128 |
$self->{use_terse_report} = 0; |
129 |
$self->{defang_mime} = 1; |
129 |
$self->{defang_mime} = 1; |
Lines 327-342
SpamAssassin as a handle for that test;
Link Here
|
327 |
$self->{scores}->{$1} = $2+0.0; next; |
327 |
$self->{scores}->{$1} = $2+0.0; next; |
328 |
} |
328 |
} |
329 |
|
329 |
|
330 |
=item rewrite_subject { 0 | 1 } (default: 1) |
330 |
=item tag_header { subject | from | to | none } (default: subject) |
331 |
|
331 |
|
332 |
By default, the subject lines of suspected spam will be tagged. This can be |
332 |
By default, the subject lines of suspected spam will be tagged. With this |
333 |
disabled here. |
333 |
space-separated list the tagging can be extended to other headers (From and |
|
|
334 |
To) or disabled completely. The use of the old option C<rewrite_subject> is |
335 |
deprecated. |
334 |
|
336 |
|
335 |
=cut |
337 |
=cut |
336 |
|
338 |
|
337 |
if (/^rewrite[-_]subject\s+(\d+)$/) { |
339 |
if (/^tag[-_]headers?\s+(.+)$/) { |
338 |
$self->{rewrite_subject} = $1+0; next; |
340 |
my @h = sort(split(/\s+/, $1)); |
|
|
341 |
unshift(@h, ''); |
342 |
for (my $i = 1; $i < scalar(@h); $i++) { |
343 |
if ($h[$i] eq 'none') { |
344 |
@h = ('none'); |
345 |
last; |
346 |
} |
347 |
$h[$i] = ucfirst(lc($h[$i])); |
348 |
if (($h[$i] !~ /^(?:Subject|From|To)$/) or |
349 |
($h[$i] eq $h[$i - 1])) { |
350 |
splice(@h, $i, 1); |
351 |
redo; |
352 |
} |
353 |
} |
354 |
shift(@h); |
355 |
|
356 |
if(@h) { |
357 |
$self->{tag_header} = [ @h ]; |
358 |
} else { |
359 |
$self->{tag_header} = undef; |
360 |
} |
361 |
next; |
362 |
} |
363 |
if (/^rewrite[-_]subject\s+(\d+)$/) { # for backward compatibility |
364 |
dbg("config option rewrite_subject is deprecated; please use tag_header"); |
365 |
my @h = defined($self->{tag_header}) ? @{$self->{tag_header}} : (); |
366 |
|
367 |
my $missing = 1; |
368 |
for (my $i = 0; $i < scalar(@h); $i++) { |
369 |
if ($h[$i] eq 'Subject') { |
370 |
$missing = 0; |
371 |
unless ($1) { |
372 |
splice(@h, $i, 1); |
373 |
} |
374 |
last; |
375 |
} |
376 |
} |
377 |
if ($1 and $missing) { |
378 |
push(@h, 'Subject'); |
379 |
} |
380 |
|
381 |
if(@h) { |
382 |
$self->{tag_header} = [ @h ]; |
383 |
} else { |
384 |
$self->{tag_header} = undef; |
385 |
} |
386 |
next; |
387 |
} |
388 |
|
389 |
=item tag_header_string STRING ... (default: *****SPAM*****) |
390 |
|
391 |
Text added to the headers of mails that are considered spam. It will be |
392 |
applied to the C<Subject:>, C<From:> and/or C<To:> header, according to |
393 |
the C<tag_header> option. |
394 |
The string _HITS_ in the tag will be replace with the calculated score |
395 |
for this message. _REQD_ will be replaced with the threshold. |
396 |
|
397 |
=cut |
398 |
|
399 |
if (/^tag[-_]headers?[-_]string\s+(.+?)\s*$/) { |
400 |
$self->{tag_header_string} = $1; next; |
401 |
} |
402 |
if (/^subject[-_]tag\s+(.+?)\s*$/) { # for backward compatibility. |
403 |
dbg("config option subject_tag is deprecated; please use tag_header_string"); |
404 |
$self->{tag_header_string} = $1; next; |
405 |
} |
406 |
|
407 |
=item rewrite_subject { 0 | 1 } (default: 1) |
408 |
|
409 |
This option is deprecated. Please use C<tag_header>. |
339 |
|
410 |
|
340 |
=item spam_level_stars { 0 | 1 } (default: 1) |
411 |
=item spam_level_stars { 0 | 1 } (default: 1) |
341 |
|
412 |
|
Lines 369-386
Some people don't like escaping *'s thou
Link Here
|
369 |
if(/^spam[-_]level[-_]char\s+(.)$/) { |
439 |
if(/^spam[-_]level[-_]char\s+(.)$/) { |
370 |
$self->{spam_level_char} = $1; next; |
440 |
$self->{spam_level_char} = $1; next; |
371 |
} |
441 |
} |
372 |
|
|
|
373 |
=item subject_tag STRING ... (default: *****SPAM*****) |
374 |
|
375 |
Text added to the C<Subject:> line of mails that are considered spam, |
376 |
if C<rewrite_subject> is 1. _HITS_ in the tag will be replace with the calculated |
377 |
score for this message. _REQD_ will be replaced with the threshold. |
378 |
|
379 |
=cut |
380 |
|
381 |
if (/^subject[-_]tag\s+(.+?)\s*$/) { |
382 |
$self->{subject_tag} = $1; next; |
383 |
} |
384 |
|
442 |
|
385 |
=item report_header { 0 | 1 } (default: 0) |
443 |
=item report_header { 0 | 1 } (default: 0) |
386 |
|
444 |
|