Suggestion box re spam scores
Denis Beauchemin
Denis.Beauchemin at USHERBROOKE.CA
Wed Jul 21 18:47:03 IST 2004
Chris W. Parker wrote:
>I was hoping that someone might submit a small patch* to enable this...
>hint hint... Anyone have something?
>
>I tried doing this myself but have so far failed. If you want to send me
>in the right direction, I've been trying to modify messages.pm and after
>saving my changes just restarting MailScanner. Is it more involved than
>that?
>
>
Chris,
Try this patch to Message.pm:
--- Message.pm 2004-07-21 13:41:49.000000000 -0400
+++ Message.pm.test 2004-07-21 13:42:06.000000000 -0400
@@ -907,7 +907,8 @@
# if it's spam AND they want to modify the subject line AND it's not
# already been modified by another of your MailScanners.
my $spamtag = MailScanner::Config::Value('spamsubjecttext', $this);
- $spamtag =~ s/_SCORE_/$scoretext/;
+ my $scoretextfmt = sprintf "%06.2f", $this->{sascore};
+ $spamtag =~ s/_SCORE_/$scoretextfmt/;
if ($this->{isspam} && !$this->{ishigh} &&
MailScanner::Config::Value('spamprependsubject',$this) &&
!$global::MS->{mta}->TextStartsHeader($this, 'Subject:', $spamtag)) {
Beware! I did not test this... but it should work 8-)
Denis
--
_
°v° Denis Beauchemin, analyste
/(_)\ Université de Sherbrooke, S.T.I.
^ ^ T: 819.821.8000x2252 F: 819.821.8045
-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/ and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html
More information about the MailScanner
mailing list