Re: [exim] header removal from acl?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Magnus Holmgren
Date:  
À: Heiko Schlittermann, exim-users
Sujet: Re: [exim] header removal from acl?
On Friday 24 November 2006 15:08, Wakko Warner wrote:
> Heiko Schlittermann wrote:
> > Wakko Warner <wakko@???> (Fr 24 Nov 2006 02:41:13 CET):
> > > Heiko Schlittermann wrote:
> > > > But in transports and routers you can remove headers. And probably
> > > > in the system filter (but then the mail already passed the ACL,
> > > > didn't it?).
> > >
> > > Good, I'm glad I wasn't missing anything. It would be nice to beable
> > > to do this. I was trying to setup something at work to change the
> > > importance of a message and an ACL was the first thought.
> > > Unfortunately, add_headers just adds new ones. MUAs that will be
> > > receiving this is outlook 2000. I didn't test which ones it uses
> > > first. I suppose I could always have it added after received.
> >
> > Here is some blueprint how you could try it:
> >
> >     ...
> >     warn
> >     add_header    = X-SECRET-Importance: 4711

> >
> > And later in the transport (I'm using the amavis transport here, because
> > all incoming messages have to pass it):
> >
> >     amavis:
> >     driver = ...
> >     headers_remove = Importance
> >     headers_add = Importance: $h_x-secret-importance

>
> I did not want to have to do it that way. The setup I have, depending on
> if the user is local or in sql, or if they have a .procmailrc or not,
> depends on which router handles it and which transport handles it. That
> sounds like I'd have to dupicate it 4 times.


Better do it in the system filter then.

if first_delivery and ${if def:h_x-secret-importance:} then
headers remove Importance
headers add "Importance: $h_x-secret-importance:"
headers remove X-SECRET-Importance
endif

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)