Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: okepc on October 31, 2006, 01:14:43 PM
-
I figured out that the qpsmtpd spamassassin plugin overrules the rewrite_subject in /etc/mail/spamassassin/local.cf
Before i had added to the rewrite_subject _SCORE_ of _ REQD_ so i could see the threshold and the spamscore.
Does anybody know how to change the format in the spamassassin qpsmtpd plugin /usr/share/qpsmtpd/spamassassin towards the end of the script? to make this work?
I tried it in there but it writes the subject exactly how i type it there:
*****SPAM***** _SCORE_ of _ REQD_
output should be: *****SPAM***** 48.1 of 5.0
So something needs to be altered in some way.
-
_SCORE_ and _REQD_ do not work here
Substitute the "***spam***" in the plugin with:
"*****SPAM***** ".$score." of ".$self->{_args}->{munge_subject_threshold}.".0 $subject"
Success, Sjef.
-
Could you please paste the whole line of code?
I have paste it but it didn't seem to work.
Lol never mind noticed you edited the post.
I pasted it in and it works like a charm.
txs
-
Here you go:
my $subject = $transaction->header->get('Subject') || '';
$transaction->header->replace('Subject', "*****SPAM***** $score of ".$self->{_args}->{munge_subject_threshold}.".0 $subject]");
return DECLINED;
Sjef
-
where should i place [ and ] ?
if the output should be *****spam***** [20 of 5]
-
Here you go:
my $subject = $transaction->header->get('Subject') || '';
$transaction->header->replace('Subject', "*****SPAM***** [".$score." of ".$self->{_args}->{munge_subject_threshold}.".0] $subject");
return DECLINED;
Sjef
-
Awesome txs Sjef!