[exim] Re: Replacing subject header when spam scanning: new …

Top Page
Delete this message
Reply to this message
Author: Andreas Metzler
Date:  
To: exim-users
Subject: [exim] Re: Replacing subject header when spam scanning: new idea & FAQ suggestion
Tim Jackson <lists@???> wrote:
[...]
> Now, the method suggested in the spec (using warn = Subject: whatever)
> is OK, but results in two Subject headers which is a bit nasty. So I
> started thinking about an improved way, and stumbled across FAQ Q0905
> (http://www.exim.org/exim-html-4.50/doc/html/FAQ_9.html#TOC288), which
> says:


> "You can only do this in a round about way, using filter commands like
> this:
> headers add "New-Subject: SPAM: $h_subject:"
> headers remove subject
> neaders add "Subject: $h_new-subject:"
> headers remove new-subject
> This trick works only in system filters, where the commands are obeyed
> in order, and affect the master list of headers that apply to the whole
> message. You cannot do this with the headers_add and headers_remove
> options on drivers."

[...]

> IN DATA ACL (normal kind of stuff):
>  warn    message       = X-Spam-Flag: YES
>          spam          = someuser


> IN APPROPRIATE ROUTERn:
>  headers_remove = Subject
>  headers_add = ${if {eq{$h_X-Spam-Flag:}{YES}}
>                     {Subject: *****SPAM***** $h_Subject:}
>                     {Subject: $h_Subject:}
>                 }


I guess this will fail miserably if the message is routed more than
once. - This /might/ not be a issue for local delivery but afaict remote
messages are frequently routed multiple times, if the remote host is
temporarily down.
              cu andreas


-- 
The 'Galactic Cleaning' policy undertaken by Emperor Zhark is a personal
vision of the emperor's, and its inclusion in this work does not constitute
tacit approval by the author or the publisher for any such projects,
howsoever undertaken.                                (c) Jasper Ffforde