Suggestion box re spam scores
Denis Beauchemin
Denis.Beauchemin at USHERBROOKE.CA
Wed Jul 21 19:14:06 IST 2004
Chris W. Parker wrote:
>Denis Beauchemin <mailto:Denis.Beauchemin at USHERBROOKE.CA>
> on Wednesday, July 21, 2004 10:47 AM said:
>
>
>
>>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
>>
>>
>
>[snip]
>
>
>
>>Beware! I did not test this... but it should work 8-)
>>
>>
>
>honestly i've never used the 'patch' command so here's what i did.
>
>1. i made a back up of my original Message.pm file.
>2. then i made a file called Message.patch that contained the following:
>
>--- 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)) {
>
>3. then i ran 'patch Message.pm Message.patch' and all it said was
>'patching Message.pm'.
>4. then i ran 'service MailScanner restart'
>
>at this point i've received two emails with high enough spam scores that
>the subject gets modified but they still look like "{Spam?}(n)" instead
>of "{Spam?}(n.nn)" or however you setup the formatting.
>
>where did i go wrong?
>
>
>
Chris,
You're using mailscanner-4.31.6-1, right?
Edit Message.pm and go to line 907. Make sure the line:
$spamtag =~ s/_SCORE_/$scoretext/;
has been replaced by:
my $scoretextfmt = sprintf "%06.2f", $this->{sascore};
$spamtag =~ s/_SCORE_/$scoretextfmt/;
That's what the patch command should have done.
If that's OK, restart MS and make sure all MS processes have been
restarted by "ps -ef|grep MailScanner" (look at the start time). If
some old process is still running, stop MS, make sure no process remains
and start it back.
Hope it works.
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