Re: [Exim] Creating domainlist with SQL select

Etusivu
Poista viesti
Vastaa
Lähettäjä: Kirill Miazine
Päiväys:  
Vastaanottaja: Wakko Warner
Kopio: Eli, exim-users
Aihe: Re: [Exim] Creating domainlist with SQL select
Wakko Warner wrote:
> > domainlist virtual_domains = \
> >     mysql;select host from users where host='$domain' limit 1

>
> This doesn't always work. Supposed you're testing virtual_domains inside of
> the mail acl. $domain is blank.


"Whenever a domain list is being scanned, $domain contains the subject
domain" (section 11.8 of the Exim specification).

It should not matter whether the list is used in an ACL or not.

> I found that useing ${lookup mysql{...}{ $sg{$value}{\\n}{ : }} }}
> works pretty well for me. it's on the wishlist to treat a \n as a
> seperator.


I do not like this approach. What if you have thousands of domains? This
will still work, but it will not be pretty.

--
Kirill Miazine
mailto:km@krot.org
http://km.krot.org/