Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Split paragraph. Made links links. X-Spam-Flag is better.

Filter mails in Outlook Express

Wiki Markup
If [SpamAssassin] only adds some mail headers (like X-Spam-
Status
Flag) to tag spam and you don't want the subject to be mangled, Outlook Express cannot filter spam to a separate folder.
A nice idea from Matt (
 A \[http://article.gmane.org/gmane.mail.spam.spamassassin.general/52651
) was to change the
 nice idea\] from a person called Matt was to change the mail's priority to low, because this is something that OE can use for filtering. This can be done using procmail,
as shown by DanKohn (
 as \[http://article.gmane.org/gmane.mail.spam.spamassassin.general/52652 shown\] by [DanKohn].

). This version has been updated to first remove low priority headers from messages before filtering:

No Format

# Remove low priority headers by piping through formail.
# If end-users filter on low priority headers, this will avoid
# false positives.  This is a procmail "or" rule requiring any
# of the three headers to trigger.

:0fw: formail1.lock
* ^X-Priority: 5|\
  ^Priority: Non-Urgent|\
  ^Importance: low
| formail -I "X-Priority" -I "Priority" -I "Importance" 

:0fw: spamassassin.lock
* < 256000
| spamassassin

# Pipe likely spam through formail adding
# the three headers that represent low priority

:0fw: formail2.lock
* ^X-Spam-LevelFlag: \*\*\*\*\*YES
| formail -I "X-Priority: 5" -I "Priority: Non-Urgent" -I "Importance: low"