Re: [Exim] smartuser new_address problem

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: John Horne
Kopio: Exim Users List
Aihe: Re: [Exim] smartuser new_address problem
On Mon, 18 Oct 1999, John Horne wrote:

> 1) mail arrives for me at the mailhub; header and envelope 'to' addresses are
>    'jhorne@???'
> 2) Rewriting rules on the envelope MAIL TO address do a file lookup to see
>    which, if any, file server my mail is to go to. For me it's 'csuf11.csd'.
>    So the envelope address becomes: jhorne@???
> 3) Exim now runs through the directors - the file server being local - and
>    this includes a 'redirection' lookup. I.e.does this user want their mail
>    sent elsewhere. I do, I want it to go to my PC
>    'jhorne.csd.plymouth.ac.uk'. The 'redirections' director (below) is a
>    smartuser and sets the 'new_address' according to the result of the
>    lookup. In my case 'new_address' becomes 'john@???'.

>
> Now at this point there is, generally, no problem. The headers are okay and
> the mail gets sent to my PC. However, as with recently, I wanted to hold
> my mail (using 'hold_domains') on the mailhub. But 'mailq' showed my mail as
> being sent to 'csuf11.csd.plymouth.ac.uk' (despite it actually arriving on
> my PC). I cannot hold the mail for the whole file server so I was stuck.


This is an inescapable effect of the way Exim works. Rewriting happens
on arrival, so the stored address is the rewritten one. However,
smartuser address changes are like aliases and forwarding; they happen
during delivery, and are not remembered. In the case of a smartuser
with a transport (which is what you have), the address change just
happens as the address passes through the director+transport; it does
not get processed as a recipient address in its own right, and so is not
seen by hold_domains. If you had used smartuser *without* a transport, then
hold_domains would work.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Government Policy: If it ain't broke, fix it till it is.