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

Mauricio Tavares raubvogel at gmail.com
Fri Aug 14 17:31:23 IST 2009


	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.


More information about the MailScanner mailing list