Re: [exim] Re: domainlist: Howto create sections?

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

> mi no neitiv spiika ;)


prity god at speeling though :-)

> > accept domains = +local_domains
> >
> >   accept  domains = @mx_primary
> >           domains = +localmx_domains  

> >
> > The second "accept" has two conditions, both of which must be true.
>
> But I don't need it in ACLs, but in the routing section


Ah.

> I assume that I could have several routers


I guess you'll need two, just like you need two ACL statements.

r1:
driver = accept
domains = +local_domains


r2:
  driver = accept
  domains = +localmx_domains
  condition = ${if match_domain \
                {${if match{${lookup dnsdb{mx=$domain}}\
                  {^\N\d+\s+(\S+)\N}{$1}}}\
                {+localmx_domains}{yes}{no}}


Oh, no. That won't work, I'm afraid. There's no guarantee that the MX
records will be returned in order. If you happen to know the preference
value for the primary MX records, you could match on that. Suppose it is
10:

r2:
  driver = accept
  domains = +localmx_domains
  condition = ${if match_domain \
                {${if match{${lookup dnsdb{mx=$domain}}\
                  {\N10\s+(\S+)\N}{$1}}}\
                {+localmx_domains}{yes}{no}}


> but then the config files gets more and more obfuscated,


Comments are your friend. :-)

-- 
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