----- Original Message ----- From: "Steve" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 11, 2003 6:57 PM Subject: [SAtalk] Rewrite subject of probably-spam
> How do I rewrite the body or subject of a message when spamd determines > probably-spam and/or almost-certainly-spam? > What I do for sites is set SA to 7.5 ish, then use the MTA to read the spam stars and if it is over 15 I route the mail to holding directory. /dev/null is a good place to hold them :-) I was looking at the code, this is all done in PerMsgStatus.pm, it appears that you can put _HITS_ in the tag text whic is then replaced by the number of hits, will this do what you want? Other wise this is open source remember, thats why we use it, look for these lines in perl/site/lib/mail/spamassassin/permsgstatus.pm (they ocurr in two places $tag =~ s/_HITS_/sprintf("%05.2f", $self->{hits})/e; $tag =~ s/_REQD_/sprintf("%05.2f", $self->{conf}->{required_hits})/e; $subject =~ s/^(?:\Q${tag}\E |)/${tag} /g; $subject =~ s/\n*$/\n/s; $self->{msg}->replace_header("Subject", $subject); and do something like this $tag =~ s/_HITS_/sprintf("%05.2f", $self->{hits})/e; $tag =~ s/_REQD_/sprintf("%05.2f", $self->{conf}->{required_hits})/e; # Code modification for two level subject tag if ($self->{hits} > 15) { $tag = "[Almost Certianly Spam]"; } #Code modification ends $subject =~ s/^(?:\Q${tag}\E |)/${tag} /g; $subject =~ s/\n*$/\n/s; $self->{msg}->replace_header("Subject", $subject); You could be more flashy and read parameters in from the config file, but you will have to do it all again when a new version is out. Stuart Gall Systems Administrator ------------------------------------------------------------------------------------------------------------- Critical Error: REALITY.SYS Corrupted! Reboot universe? (y/n) [y]: ------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk