Re: [exim] Is there any way to get exim to display the exapn…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Ritchie P. Fraser
Ημερομηνία:  
Προς: Warren Baker
Υ/ο: exim-users@exim.org
Αντικείμενο: Re: [exim] Is there any way to get exim to display the exapnded list returned from a pgsql lookup? {Scanned}
The "<\n " at the beginning of the sql of the domainlist worked a charm. Thanks.

Ritchie

-----Original Message-----
From: Warren Baker [mailto:warren@decoy.co.za]
Sent: 12 February 2014 11:24
To: Ritchie P. Fraser
Cc: exim-users@???
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 <rpf@???> 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: joeblow@???
> ...
>>>> 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.