Re: [Exim] SPAM TAG after RBL'ed

Top Page
Delete this message
Reply to this message
Author: Sheldon Hearn
Date:  
To: Oren Levi
CC: exim-users
Subject: Re: [Exim] SPAM TAG after RBL'ed
On (2003/09/23 21:43), Oren Levi wrote:

> How would i go about adding a tag to the original subject so that a
> user could just filter it?


If you're using the exiscan-acl patch and SpamAssassin, it's pretty
easy. Add a new router and a new transport:

# This director matches local user mailboxes for which we're allowed to
# mangle the Subject line if the message looks like spam.
#
localuser_subject_spam:
  driver = accept
  check_local_user
  local_parts   = .../etc/exim/spam_tagging_recipients
  condition     = ${if match {$h_X-Spam-Score:}{\N\+\+\+\+\+\N}{1}}
  transport = local_delivery_subject_spam


...

# Exactly the same as local_delivery, but with subject mangling for spam
# messages.
#
local_delivery_subject_spam:
driver = appendfile
...
headers_remove = subject
headers_add = Subject: ***SPAM*** $h_Subject:


Now you can add the localparts of users who want Subject line spam
tagging to the file .../etc/exim/spam_tagging_recipients, without
inconveniencing folks who don't want this feature.

Ciao,
Sheldon.