[prev in list] [next in list] [prev in thread] [next in thread] 

List:       exim-users
Subject:    Re: .forward is evaluated twice ...
From:       Philip Hazel <ph10 () cus ! cam ! ac ! uk>
Date:       1997-10-27 10:30:21
[Download RAW message or body]

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@blubber.oops.sub.de
> | sven@blubber.oops.sub.de -> |/home/sven/doit
> | sven@akasha.oops.sub.de -> |/home/sven/doit
> | sven@akasha.oops.sub.de
> |     <-- sven@akasha.oops.sub.de
> |     <-- sven@blubber.oops.sub.de
> |   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@blubber.oops.sub.de matches this director, and generates two 
new addresses:

   "|/home/sven/doit"  and  sven@akasha.oops.sub.de
   
(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@akasha.oops.sub.de might be a 
totally different person from sven@blubber.oops.sub.de. 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@oops.sub.de  T



-- 
Philip Hazel                   University Computing Service,
ph10@cus.cam.ac.uk             New Museums Site, Cambridge CB2 3QG,
P.Hazel@ucs.cam.ac.uk          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.org
* Exim information can be found at http://www.exim.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic