Re: [EXIM] Envelope From rewriting.

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: James FitzGibbon
CC: kiss the sun and walk on air, exim-users
Sujet: Re: [EXIM] Envelope From rewriting.
On Tue, 20 Apr 1999, James FitzGibbon wrote:

> What you're trying to do is a bit difficult using only one Exim
> configuration file. Exim's rewrite rules use a source pattern, rewrite
> pattern, and flags to indicate what parts of the message should be
> rewritten. They do not allow for decisions made upon two criteria.


Well, there are conditional features in the string expansion...

> You need some sort of logic to say "when the From: header is
> peter.royal@???, change the envelope sender to the same, but when the
> >From header is peter.royal@???, change the envelope sender to
> osi@???".


How about

*@*  "${if matches{$h_from:}{peter\\.royal@pobox\\.com}\
          {peter.royal@???}\
          {\
          ${if matches{$h_from:}{peter\\.royal@alligator\\.org}\
            {osi@???} fail}\
          }\      
      }"  F


for example?

> Unless I have grossly misread the documentation, there is no facility in
> Exim to do this with just one rewriting configuration file.


I haven't tested the above. Maybe I've overlooked something...

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***