On X-Spam-Status, X-Spam-Flag, X-MailScanner-SpamCheck, and other weirdness

Mauricio Tavares raubvogel at gmail.com
Fri Aug 14 21:16:03 IST 2009


Jules Field wrote:
> 
> 
> On 14/08/2009 20:40, Mauricio Tavares wrote:
>> Jules Field wrote:
>>> MailScanner does not use any header generated by SpamAssassin. It 
>>> does not allow SpamAssassin to modify the message. It adds its own 
>>> headers, based on the spam status and report returned by 
>>> SpamAssassin. So you won't get the same headers you get from using 
>>> spamd or anything like that from your MTA. You will get the headers 
>>> that MailScanner adds based on the output of SpamAssassin (which is 
>>> basically a report and a spam score number).
>>>
>>     I thought that MailScanner used X-Spam-Status, which is also used 
>> by spamassassin but in a different way.
> It will use any header you tell it to, it's totally customisable. You 
> can trivially tell it to use X-Spam-Status, just edit the 
> MailScanner.conf file and "service MailScanner reload".
>>

	I see what you mean, In fact, in my MailScanner.conf we have lines like

Spam Actions = deliver header "X-Spam-Status: Yes"

But one of the questions I have is that when it sees that header in the 
mail, it does not wipe it and puts its own version. Instead it appends 
the reply to the currently existing header, hence the

X-Spam-Status: No, Yes

I mentioned before. Ignore the tag name itself. If MailScanner is using 
the X-Spam-Status tag to identify a Yes/No-only answer, shouldn't it 
make sure there is no other value for that tag?

>>> Hope that helps explain it a bit.
>>>
>>> Jules.
>>>
>>> On 14/08/2009 17:31, Mauricio Tavares wrote:
>>>>     This email does not sound like a question; it is more about 
>>>> weird thoughts that are haunting me. Expect then a lot of confusion 
>>>> because that is how I am feeling right now. I am just trying to 
>>>> figure out what is going on here.
>>>>
>>>> I have been using X-Spam-Status: as a trigger for my dovecot sieve 
>>>> script to move spam into a Spam folder. Playing around with it, I 
>>>> found something interesting (at least to me): If I create a proper 
>>>> spam email and add to its header something like this:
>>>>
>>>> X-Spam-Status: No (or maybe or spongebob for that matters)
>>>>
>>>> and then send the spam to your my server, Mailscanner will properly 
>>>> detect it as spam and then edit X-Spam-Status like this:
>>>>
>>>> X-Spam-Status: No, Yes
>>>>
>>>> I was going to include my sieve script but what I am trying to 
>>>> figure out is something else. In MailScanner.conf we have these two 
>>>> lines:
>>>>
>>>> Spam Actions = deliver header "X-Spam-Status: Yes"
>>>> Non Spam Actions = deliver header "X-Spam-Status: No"
>>>>
>>>> I thought that indicated that if there was a X-Spam-Status header in 
>>>> the mail, it would be wiped and replaced with ones of the 
>>>> X-Spam-Status headers shown above. Also, it seems that while 
>>>> spamassassin would do something like
>>>>
>>>> X-Spam-Status: spam, SpamAssassin (cached, score=9.645,    required 
>>>> 4.7, BAYES_50 0.00, FH_HELO_ENDS_DOT 2.31,    FORGED_MUA_OUTLOOK 
>>>> 3.12, HTML_MESSAGE 0.90, MSOE_MID_WRONG_CASE 0.82,    
>>>> RAZOR2_CF_RANGE_51_100 0.50, RAZOR2_CF_RANGE_E4_51_100 1.50,    
>>>> RAZOR2_CHECK 0.50)
>>>> X-Spam-Flag: YES
>>>>
>>>> MailScanner does the same using its own header,
>>>>
>>>> X-MailScanner-SpamCheck: spam, SpamAssassin (cached, score=9.645, 
>>>> required 4.7, BAYES_50 0.00, FH_HELO_ENDS_DOT 2.31, 
>>>> FORGED_MUA_OUTLOOK 3.12, HTML_MESSAGE 0.90, MSOE_MID_WRONG_CASE 
>>>> 0.82,  RAZOR2_CF_RANGE_51_100 0.50, RAZOR2_CF_RANGE_E4_51_100 1.50, 
>>>> RAZOR2_CHECK 0.50)
>>>> X-Spam-Status: Yes
>>>>
>>>> So, MailScanner uses X-Spam-Status the same way spamassassin uses 
>>>> X-Spam-Flag.
>>>
>>> Jules
>>>
>>
> 
> Jules
> 



More information about the MailScanner mailing list