Re: [Exim] multiple directors

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: Jeffrey Goldberg
Kopio: J. Nick Koston, exim-users
Aihe: Re: [Exim] multiple directors
On Sat, 30 Dec 2000, Jeffrey Goldberg wrote:

> > See the docs for the "unseen" option. Put this in the first director(s)
> > listed and the message will be passed to the subsequent ones.
>
> Beware. If an address is found in the first one (with the unseen) but not
> in the second one then it will get delivered but will also (under most
> normal set-ups) generate an "unknown user" bounce.


Indeed. If you want an incoming address to be "properly" delivered to
two different "child" addresses (or lists), "unseen" is not really the right
way to do it.

In fact, you don't need two different directors. You could use a
smartuser director with an option something like this:

new_address = ${lookup{$local_part}lsearch{/etc/aliases1}{$value,}}\
              ${lookup{$local_part}lsearch{/etc/aliases2}{$value}\
              {${if !eq{$value}{}{}fail}} 
                         |||||
                         ||||| 
This $value contains the result of the *first* lookup at this point 
(since it appears in the string that is used when the second lookup 
fails). What this is saying is "if second lookup fails, fail if the 
first lookup also failed".


I have not tested this, but I think it should work.


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