Re: [Exim] Conditions

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Juha Saarinen
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] Conditions
On Tue, 14 May 2002, Juha Saarinen wrote:

> How is this condition expanded/interpreted?
>
> condition = ${if eq {}

     {
     ${lookup{$local_part}lsearch{/etc/exim/${domain}.aliases}}
     }
     {no}{yes}}


[Condition split so I can understand it...]

> Does it look up the local_part in a $domain.aliases file, and returns a
> "no" if local_part is not found, or a "yes" if it is?


Yes. I think. :-)

A simpler condition would be

condition = ${lookup{$local_part}lsearch{/etc/exim/$domain.aliases}{yes}{no}}

> I need a condition that matches both $local_part and $domain for virtual
> domains, but can't think of a good way to do it. That is, if a message is
> addressed to user@???, then use this router; if the address is
> user@???, skip and go to next router.


Another possibility:

domains = right.domain : ... (or a lookup of some kind - dsearch may be useful)
local_parts = lsearch;/etc/exim/$domain.aliases

You may want to add no_more to that.


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