You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Andrew Bruce <ab...@hope-st.ath.cx> on 2009/04/01 00:23:45 UTC
Always show test scores in email header
Is it possible to have a header, or in X-Spam-Status always show the
individual scores for each of the test performed against a particular email
(whether it is tagged as spam or not)?
I see that when using MailScanner with SpamAssassin this always happens,
but cannot replicate the same for a straight SpamAssassin installation.
This is an example of what I get in an emails source from MailScanner and
would like to replicate in SpamAssassin:
X-MailScanner-Spam: not spam, SpamAssassin (not cached,
score=4.616, required 5, BAYES_40 -0.18, DCC_CHECK 4.50,
HTML_MESSAGE 0.00, RDNS_DYNAMIC 0.10, SARE_HTML_USL_A 0.20)
Regards,
Andrew Bruce
Re: Always show test scores in email header
Posted by Mark Martinec <Ma...@ijs.si>.
Andrew,
> Odd, because on SpamAssassin it never showed that header unless the message
> was marked as spam. Although I should have mentioned that it's being
> called through amavisd-new which may have had something to do with it.
> I've added a custom header, and played with the $sa_tag_level_deflt values
> in amavis, now the header shows up:
>
> X-Spam-Scores: ALL_TRUSTED=-1.8,BAYES_00=-2.599,HTML_MESSAGE=0.001,
> MIME_HTML_ONLY=1.457,NO_DNS_FOR_FROM=1.496
Now you tell. The X-Spam-* header fields are added by amavisd when
spam score exceeds $sa_tag_level_deflt or when $sa_tag_level_deflt
is undef (which is a default). Also, recipient must be considered
local (must match the @local_domains_maps).
Mark
Re: Always show test scores in email header
Posted by Andrew Bruce <ab...@hope-st.ath.cx>.
On Tue, 31 Mar 2009 23:08:14 -0400, Matt Kettler <mk...@verizon.net>
wrote:
> Andrew Bruce wrote:
>> Is it possible to have a header, or in X-Spam-Status always show the
>> individual scores for each of the test performed against a particular
>> email
>> (whether it is tagged as spam or not)?
>>
>> I see that when using MailScanner with SpamAssassin this always happens,
>> but cannot replicate the same for a straight SpamAssassin installation.
>>
>> This is an example of what I get in an emails source from MailScanner
and
>> would like to replicate in SpamAssassin:
>> X-MailScanner-Spam: not spam, SpamAssassin (not cached,
>> score=4.616, required 5, BAYES_40 -0.18, DCC_CHECK 4.50,
>> HTML_MESSAGE 0.00, RDNS_DYNAMIC 0.10, SARE_HTML_USL_A 0.20)
>>
>>
> You're using MailScanner, which generates it's own markup. SA by default
> always adds such a header, but MailScanner doesn't use it.
>
> There's an option in MailScanner.conf to make MailScanner do this. It's
> something like "always include spamassassin report" or something like
that.
Odd, because on SpamAssassin it never showed that header unless the message
was marked as spam. Although I should have mentioned that it's being
called through amavisd-new which may have had something to do with it.
I've added a custom header, and played with the $sa_tag_level_deflt values
in amavis, now the header shows up:
X-Spam-Scores: ALL_TRUSTED=-1.8,BAYES_00=-2.599,HTML_MESSAGE=0.001,
MIME_HTML_ONLY=1.457,NO_DNS_FOR_FROM=1.496
Re: Always show test scores in email header
Posted by Matt Kettler <mk...@verizon.net>.
Andrew Bruce wrote:
> Is it possible to have a header, or in X-Spam-Status always show the
> individual scores for each of the test performed against a particular email
> (whether it is tagged as spam or not)?
>
> I see that when using MailScanner with SpamAssassin this always happens,
> but cannot replicate the same for a straight SpamAssassin installation.
>
> This is an example of what I get in an emails source from MailScanner and
> would like to replicate in SpamAssassin:
> X-MailScanner-Spam: not spam, SpamAssassin (not cached,
> score=4.616, required 5, BAYES_40 -0.18, DCC_CHECK 4.50,
> HTML_MESSAGE 0.00, RDNS_DYNAMIC 0.10, SARE_HTML_USL_A 0.20)
>
>
You're using MailScanner, which generates it's own markup. SA by default
always adds such a header, but MailScanner doesn't use it.
There's an option in MailScanner.conf to make MailScanner do this. It's
something like "always include spamassassin report" or something like that.
Re: Always show test scores in email header
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Wed, 2009-04-01 at 11:23 +1300, Andrew Bruce wrote:
> Is it possible to have a header, or in X-Spam-Status always show the
> individual scores for each of the test performed against a particular email
> (whether it is tagged as spam or not)?
>
> I see that when using MailScanner with SpamAssassin this always happens,
> but cannot replicate the same for a straight SpamAssassin installation.
>
> This is an example of what I get in an emails source from MailScanner and
> would like to replicate in SpamAssassin:
> X-MailScanner-Spam: not spam, SpamAssassin (not cached,
> score=4.616, required 5, BAYES_40 -0.18, DCC_CHECK 4.50,
> HTML_MESSAGE 0.00, RDNS_DYNAMIC 0.10, SARE_HTML_USL_A 0.20)
The option add_header all [1] along with the _TESTSSCORES(,)_ [2]
Template instead of the default _TESTS(,)_ should do. You can either add
that as a new, custom header or overwrite the default Status header.
[1] http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html#basic_message_tagging_options
[2] http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html#template_tags
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}