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

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Warren Baker
Datum:  
To: Ritchie P. Fraser
CC: exim-users@exim.org
Betreff: 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