The "<\n " at the beginning of the sql of the domainlist worked a charm. Thanks.

Ritchie

-----Original Message-----
From: Warren Baker [mailto:[email protected]] 
Sent: 12 February 2014 11:24
To: Ritchie P. Fraser
Cc: [email protected]
Subject: Re: [exim] Is there any way to get exim to display the exapnded list 
returned from a pgsql lookup? {Scanned}

On Wed, Feb 12, 2014 at 1:01 PM, Ritchie P. Fraser <[email protected]> 
wrote:
>
> I have since also tried out your suggestion of using match_domain
>
>           condition     = ${if match_domain{$domain}{+our_sql_maildomains} 
> {yes}{no}}
>
> but get the following
> $ exim -bh 192.168.0.115
> ...helo and mail from...
> rcpt to: [email protected]
> ...
>>>> ourcompany.com in ": ourcompany.co.uk ourcompany.biz 
>>>> ourcompany.ltd.biz ourcompany.co ourcompany.com ourcompany.info 
>>>> ourcompany.ltd.info ourcompany.ltd.net ourcompany.org 
>>>> ourcompany.ltd.org ourcompany.ltd.co.uk ourcompany.me.uk 
>>>> ourcompany.ltd.me.uk ourcompany.org.uk ourcompany.ltd.org.uk"? no 
>>>> (end of list) ourcompany.com in "+our_sql_maildomains"? no (end of 
>>>> list) check condition = ${if 
>>>> match_domain{$domain}{+our_sql_maildomains} {yes}{no}}
>>>>                 = no
>>>> accept: condition test failed in ACL "acl_check_rcpt"
>
> So the expansion of +our_sql_maildomains IS calling postgresql AND 
> executing the query AND returning a list of the company domain names 
> AND doing the comparison which is all brilliant, but for whatever 
> reason didn't match the domain :-(



Check out section 6.20
(http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_run_time_configuration_file.html#SECID53)
of the manual on ' Changing list separators'.
Changing that should get you your expected results. Change your separator to \n 
so something like the following in your config

domainlist our_sql_maildomains  = <\n ${lookup pgsql{.....}}


.warren

--
This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to