Re: [Exim] Creating domainlist with SQL select

Pàgina inicial
Delete this message
Reply to this message
Autor: Kirill Miazine
Data:  
A: Wakko Warner
CC: Eli, exim-users
Assumpte: 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/