On Tue, 27 Jan 1998, Christopher Petro wrote:
> > Chapter 33 covers this. The form you have used (lookup for the local
> > part, non-lookup for the domain) is not supported. Indeed what you have
> > written doesn't seem sensible, as you are going to rewrite a local part
> > *whatever* the domain - surely you don't want to mess with local parts
> > in foreign domains that just happen to be the same as yours?
>
> I think I miscommunicated my goal. This machine has a hundred or so
> accounts (will be 10000 or so soon), and all of the users use a
> proprietary MUA. This MUA is so incredibly broken that it doesn't allow
> you to put a From: header in your messages. Thus, all of the messages
> leaving this machine show up as user@??? (our domain). However,
> they actually work for other comapanies, whose email we host. So I need
> exim, when it receives their messages, to append a specific domain,
> depending on their user id. I know this is a wierd situation, considering
> that normally the MUA is supposed to provide this functionality by
> allowing the user to specify a From: address. <sigh>
>
> Since lookup of local part is not supported, do you see ANY way for me to
> do this without going back to sendmail (aaaaaugh)?
So, you want to rewrite any address of the form user@??? according
to the local part, if it appears in a From: header (or, I assume, in the
envelope From field). Is that right? That should be easy enough:
*@thing.org ${lookup{$local_part}lsearch{/address/rewrite/file}{$value}fail} fF
The fF causes the rewrite to apply only to the From: header and the
envelope From field. If you want to rewrite other headers, adjust these
flags accordingly. The file would be of the form
firstuser: J.Doe@???
nextuser: B.Clinton@???
and so on. If you really to get to 10000 users, it would be better to
make use of a DBM file because that would be faster.
--
Philip Hazel University Computing Service,
ph10@??? New Museums Site, Cambridge CB2 3QG,
P.Hazel@??? England. Phone: +44 1223 334714
--
*** Exim information can be found at
http://www.exim.org/ ***