On Thu, 07 Aug 2003 09:33:51 +0100, Philip Hazel wrote:
> > So, a system filter is out, and user filters don't allow the use of
> > "headers add" and "headers remove" (although I'm not sure _why_ not).
>
> This has been on the Wish List since Exim 3. I just haven't got round to
> looking at the ramifications it would have.
>
> > What do I do?
>
> Could a transport filter help?
Philip, as usual, you're the king. A transport filter is exactly what I
needed, and it works wonderfully.
I've included skeletal config below, for the benefit of the archives.
Thanks,
Sheldon.
# This director matches local user mailboxes for which we're allowed to
# mangle the Subject line if the message looks like spam.
# This must precede localuser.
#
localuser_subject_spam:
driver = accept
check_local_user
local_parts = jo-lene : linda : robvdv
condition = ${if match {$h_X-Spam-Score:}{\N\+\+\+\+\+\N}{1}}
transport = local_delivery_subject_spam
# This router matches local user mailboxes.
#
localuser:
driver = accept
check_local_user
transport = local_delivery
# Deliver into maildir-style "mailboxes", where each mailbox is really
# a subdirectory containing one file per message.
#
local_delivery:
driver = appendfile
...
# 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: