Hi,
in the ML archive I found a mail from May 2006 from M.Lewis asking whether
there is a way to include the SA score on the subject line, like the SA
configuration option:
rewrite_header SUBJECT ***SPAM***(_SCORE(00)_)***
Mark Martinec answered that it currently is not configurable
and Petr Vokac sent a patch for amavisd-new-2.4.1 to the list.
Who do I have to convince so this patch is included as a
configurable option? :-)
I think this would be very desirable for many users.
Usage Example: Putting the score into the subject makes it possible to find
mails that are most likely false positives by simply sorting the mailbox by
subject line.
Thanks,
Andy.
PS: here's the mentioned patch:
--- amavisd-new-2.4.1/amavisd 2006-05-09 00:02:14.000000000 +0200
+++ amavisd-new-2.4.1/amavisd 2006-05-09 00:10:58.000000000 +0200
@@ -8341,6 +8341,8 @@
$subject_insert, $any_undecipherable, $hold);
}
$subject_insert .= $subject_tag if $do_subj;
+ $subject_insert =~ s/\s*$// if $do_subj;
+ $subject_insert .= sprintf("(%.1f) ",$spam_level+$boost) if
$do_subj and defined $spam_level;
}
my($key) = join("\000", map {defined $_ ? $_ : ''} (
$do_tag_virus_checked, $do_tag_virus, $do_tag_banned, $do_tag_badh,
@@ -8403,7 +8405,7 @@
if ($do_subj || $do_subj_u) {
if (defined $msginfo->orig_header_fields->{'subject'}) {
$hdr_edits->edit_header('Subject',
- sub { $_[1]=~/^([ \t]?)(.*)\z/s; '
'.$subject_insert.$2 });
+ sub { $_[1]=~/^([
\t]?)([\[\*]*SPAM[\]\*]*\(?\d*\.*\d*\)?\s*)*(.*)\z/s; '
'.$subject_insert.$3 });
} else { # no Subject header field present, insert one
$subject_insert =~ s/[ \t]+\z//; # trim
$hdr_edits->append_header('Subject', $subject_insert);
--
Linux - It is now safe to turn on your computer.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/