Re: [Exim] /etc/aliases used after qualify_domain

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: Frank Petzold
Cc: exim-users
Asunto: Re: [Exim] /etc/aliases used after qualify_domain
On Thu, 9 Mar 2000, Frank Petzold wrote:

> How can I get exim to process /etc/aliases before anything else is done to
> the address?


Internally, Exim works only with fully qualified addresses, i.e. they
must all contain a local part and a domain.

At some of the "entrances" to Exim it is prepared to accept an
unqualified address (just a local part), but such addresses always get a
domain added before being accepted and processed further.

> Thus spake Philipp Gaschütz (philipp@???):
>
> > Well...
> >
> > You need a rewrite rule that looks whether the address has a domain
> > appended to $localpart (if ! $domain), if it has not, it looks in
> > /etc/aliases for valid matches, if this also returns false then you
> > change the recipient to $local_part@???


You cannot do this. By the time the rewriting rules are applied, all
addresses have domains appended. [The only exception is the SMTP
rewriting rule, which happens at SMTP time.]

> If this is the only solution (in fact, if it can´t be solved in less than
> two lines in the config file) I think this is an error in exim, and it
> should be changed there.


I'm afraid I read the RFCs before I wrote Exim. They define an address
as "localpart@domain", so that's what it works on. Now, what was the
original question again? Ah yes,

> I need to qualify most unqualified users with @zurich.ibm.com, but if I
> use qualify_domain, local users, such as root and postmaster, get the
> domain appended before /etc/aliases is processed. As the delivery rules
> for all these administration users is there, it does not work. And I don't
> want my anacron output sent to root@???.


This seems to me to be a logical problem. How do you define "most"? You
want some addresses qualified one way and some another way? How is Exim
to know which are which? How do you know which are which? How do these
unqualified addresses originate?

If the difference is that one set are senders and another set are
recipients, you can make use of qualify_recipient as well as
qualify_domain to do different things.

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