Bug 133 - option to set X-message-flag?
Summary: option to set X-message-flag?
Status: RESOLVED DUPLICATE of bug 104
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: 2.11
Hardware: PC Windows 2000
: P2 enhancement
Target Milestone: ---
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-25 18:33 UTC by James Henstridge
Modified: 2002-03-26 01:47 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description James Henstridge 2002-03-25 18:33:45 UTC
If a message has an X-message-flag header, Outlook will display the text of that
header in a small yellow box with the headers.  This would be a good way to
indicate reasons for marking a message as spam, when using a tearse report in
the subject.
Comment 1 Michael Moncur 2002-03-26 00:25:34 UTC
I have this set up already as a procmail hack, but built-in functionality would 
be nice. One implementation note: Currently mine sends an X-message-flag header 
like "7.8 hits; 6 required" - if SA could use a leading zero for scores < 10, 
brain-damaged Outlook could sort the messages by score correctly.

Also note that there are some known and unknown issues getting Outlook to 
consistently display this header. In my procmail code, I had to replace SA's 
default X-Spam-Status header with a simple "Yes" or else Outlook would ignore 
the X-message-flag header. Outlook also ignores the message flag header when 
messages are viewed in an IMAP folder - this trick works only with POP3 mail.

Procmail code follows - I use this after the main :0fw line for SpamAssassin 
and before the delivery rules. This just grabs part of the X-Spam-Report field.

:0fw
* ^X-Spam-Report:  \/.*;
| /usr/bin/formail -I "X-message-flag: $MATCH" -I "X-Spam-Status: Yes"
Comment 2 James Henstridge 2002-03-26 01:19:47 UTC
I had forgotten about this only working for POP mailboxes.  I just tried it now
and confirmed that it didn't work (I don't usually use outlook, but many people
here do).

I sent myself a test message with an "X-message-flag:" header, and it didn't
display the message.  However, if I clicked on the flag toolbar button, the
default message to use for the flag was the one I had in the header.  After
setting the flag, the message displayed fine.

It looks like Outlook only looks at the X-message-flag: header if the message
has the \Flagged flag set.  AFAIK, you can't set message flags during delivery.

Now UW IMAP stores flags as extra headers in the mbox file, so you can probably
work around the problem there by setting the appropriate header.  However, I am
using Cyrus, so this doesn't really help me -- might be useful to other people
though.

/me wonders if a sieve script can set message flags
Comment 3 Craig Hughes 2002-03-26 10:47:32 UTC

*** This bug has been marked as a duplicate of 104 ***