Re: [exim] Misunderstanding match_domain and sqlite ...

Top Page
Delete this message
Reply to this message
Author: Jakob Hirsch
Date:  
To: Jim Cheetham
CC: exim-users
Subject: Re: [exim] Misunderstanding match_domain and sqlite ...
Jim Cheetham, 2010-04-06 00:34:

>>> I'm using a sqlite query in a match_domain condition in an ACL for check_rcpt, but it's failing.
>> I suspect that what's happening is not that the where clause is failing,
>> but the sql return is not a domain list.
>> domainlist active_domains = ${sg { ${sqlite; /etc/exim4/mta.db select name from domains where status="active"; }}{\\n}{:}}
> Ah, indeed -- this seems to be exactly the problem, and solved. Thanks.


even easier and with less cpu cycles (not that it mattes much :) is this:

domainlist active_domains = <\n ${lookup sqlite {/etc/exim4/mta.db
select name from domains where status="active"}}


All the SQL lookups return a LF-separated list. Exim should probably
handle LF as a separator by default, I guess...