Re: [exim] domainlist: Howto create sections?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: exim-users
Sujet: Re: [exim] domainlist: Howto create sections?
On Wed, 8 Dec 2004, Axel Thimm wrote:

> I'd like to express something like
>
>     domain either in list1 or in list2 and list3


Complicated "boolean" conditions like that are not straightforward in
Exim's simple list-processing.

> domainlist listX = +list1 : +list2


That can be read "in list1 or in list 2".

> domainlist not2or3 = !+list2 : !+list3


That can be read "not in list2 and not in list3".

> But that won't work, as when negations enter the lists cannot be
> considered anymore as union of the elements (e.g. all non-list2 domain
> match the first and never check the second).


It doesn't work quite like that. If a domain matches list2, the answer
is "no", otherwise it checks list3.

> # Accept mail as local if in local_domains or we are primary mx of the
> # domains in +localmx_domains


That doesn't make sense. Surely what you mean is: "Accept mail as local
if the current domain is in local_domains or we are the primary mx for
*the current domain* and it is also in localmx_domains"?

I don't think you can do this in one list, but you can do it an an ACL:

accept domains = +local_domains

  accept  domains = @mx_primary
          domains = +localmx_domains  


The second "accept" has two conditions, both of which must be true.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book