Re: .forward is evaluated twice ...

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Sven Paulus
CC: exim-users
Tárgy: Re: .forward is evaluated twice ...
On Sun, 26 Oct 1997, Sven Paulus wrote:

> If a host accepts mail for multiple hostnames, for example using a
> setup like this:
>
> | primary_hostname = akasha.oops.sub.de
> | local_domains = *.oops.sub.de:oops.sub.de
>
> and a user on this host has a .forward, which sends the mail to a pipe as
> well as to the real mailbox:
>
> | "|/home/sven/doit"
> | \sven
>
> then every time a mail is sent to user@not_primary_hostname, the pipe
> command is executed twice:
>
> | sven@akasha ~$ exim -bt sven@???
> | sven@??? -> |/home/sven/doit
> | sven@??? -> |/home/sven/doit
> | sven@???
> |     <-- sven@???
> |     <-- sven@???
> |   local delivery to sven in domain akasha.oops.sub.de
> |   director = localuser, transport = local_delivery

>
> Is there any possibility to avoid this behaviour? As far as I see, smail for
> example only pipes once in a setup like this.


Smail (at least the versions I knew) treats all local domains as
synonymous (i.e. just different names for the same domain). Exim
differentiates between them. From the above output, I am guessing that
you have a single forwardfile director that applies to all local
domains.

Thus, sven@??? matches this director, and generates two
new addresses:

"|/home/sven/doit" and sven@???

(I'm assuming your qualify_domain is akasha.oops.sub.de). Exim does not
force akasha.oops.sub.de to be synonymous with blubber.oops.sub.de; and
indeed, as far as it is concerned sven@??? might be a
totally different person from sven@???. Consider the
case where the name of the forward file is dependent on the domain.

Consequently, Exim happily obeys the forwardfile director again. It does
not treat "|/home/sven/doit" as a duplicate address, because it was
generated by a different parent address.

This behaviour is in fact relied on in some configurations handling
multiple virtual domains - the typical case is "postmaster", which might
be different for each domain.

If you really do want to treat all these domains as synonymous, one way
you can do it is to rewrite the envelope address with a rewriting entry
such as

*@*.oops.sub.de $local_part@??? T



-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
* This is sent by the exim-users mailing list.  To unsubscribe send a
    mail with subject "unsubscribe" to exim-users-request@???
* Exim information can be found at http://www.exim.org/