Re: [exim] multiple results for ldap lookups

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Kyle King
日付:  
To: exim-users
題目: Re: [exim] multiple results for ldap lookups
I added a ${tr to replace the commas with ":" and it now correctly
matches each item in the returned list.

Kyle A. King
Quentus Technologies, INC
Cell: 703-635-9512
Work: 253-218-6030
Fax: 206-462-1861
Email: kyle.king@???


On 02/24/2012 07:30 AM, Hubertus von Fürstenberg wrote:
> Am 24.02.12 00:51, schrieb Jeremy Harris:
>> On 2012-02-23 18:54, Kyle King wrote:
>>> I have the ldap look up "domains = ${lookup ldap
>> [...]
>>> LDAP search: returning: example.com, mydomain.com
>>> lookup yielded: example.com, mydomain.com
>>> example.com in "example.com, mydomain.com"? no (end of list)
>>> "
>>> Is there a condition that i can use to see if the string contains
>>> $domain?
>>>
>>
>> So. "domains =" takes a "domain list" according to the docs:
>>
>> (in ACL)
>> http://exim.org/exim-html-current/doc/html/spec_html/ch40.html#SECTcondmodproc
>>
>>
>> (in router)
>> http://exim.org/exim-html-current/doc/html/spec_html/ch15.html
>>
>> ... and your LDAP lookup seems to be returning a comma-separated list.
>>
>>
>> Here's the description of a domain list:
>> http://exim.org/exim-html-current/doc/html/spec_html/ch10.html#SECTdomainlist
>>
>>
>>
>> Note the bit about setting a delimiter for a list.
>>
>> For an expanded description of that look at
>> http://exim.org/exim-html-current/doc/html/spec_html/ch06.html#SECTlistconstruct
>>
>>
>>
>>
>> Put that lot together, and you should be operational.
>
>
> Hi,
> funny enough, my LDAP (Novell E-Directory) returns a newline separated
> list, YMMV.
>
> Here ist my domain-list directive:
>
> domainlist local_domains = ${tr {${lookup ldapm \
>                            {LDAP_OPTIONS
> ldap:///ou=projectdomains,ou=Services,ou=ISE,o=Fraunhofer,c=DE?ou?one?}}}
> {\n} {:}}

>
> Hope this helps,
>
> Hubertus
>