Re: [Exim] domain-dependent envelope-mods

Top Pagina
Delete this message
Reply to this message
Auteur: Philip Hazel
Datum:  
Aan: Horsnell T.
CC: exim-users
Onderwerp: Re: [Exim] domain-dependent envelope-mods
On Thu, 15 Aug 2002, Horsnell T. wrote:

> I'm an exim newbie, so please forgive any howlers.


Hello, Terry. Long time no communicate...

> I cant work out how to make exim change the envelope
> sender-domain (and the appropriate message headers)
> in a way which depends upon both the sending-host
> (only do this at all for outgoing mail, i.e. mail with
> sending hosts *.mrc-lmb.cam.ac.uk) and which also
> depends upon the sender's localpart, which would exist
> in one of two (ideally alias) files, one for mrc-lmb members
> and one for mrc-centre members.


You should be able to do this in a rewrite with a sufficiently
complicated replacement text. Here is a rough outline - not tested in
any way, which looks in just a single file:

*@*  "${if eq{${mask:$sender_host_address/24}}{n.n.n.0/24} \
     {\
     $local_part@${lookup{${local_part:$sender_address}}lsearch{/some/file}{$value}fail}\
     }fail}"  Ffrs


where n.n.n.0 is your local network. To use a second file, replace the
"fail" in the lookup with a second, nested lookup.

Philip

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