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

Pàgina inicial
Delete this message
Reply to this message
Autor: Jeff
Data:  
A: exim-users
Assumpte: Re: [exim] Re: Replacing subject header when spam scanning: new idea &FAQ suggestion
From: "Andreas Metzler" <eximusers@???>
> 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

>


However, the crevat of "IN APPROPRIATE ROUTERn"..
Obviously, you dont add these lines on the router (or transport) for remote
deliveries..
In fact, you would usually only add it to the appropriate LOCAL delivery
router/s (or transports)..

And it works well - been doing similar for a couple of years.

Rgds
Jeff