Re: [exim-dev] [Bug 590] New: incorrect processing combinati…

Página Inicial
Delete this message
Reply to this message
Autor: Ted Cooper
Data:  
Para: 590
CC: exim-dev
Assunto: Re: [exim-dev] [Bug 590] New: incorrect processing combination with ldap request and macros
lissyara wrote:
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
> http://bugs.exim.org/show_bug.cgi?id=590
>            Summary: incorrect processing combination with ldap request and
>                     macros
>            Product: Exim
>            Version: 4.67
>           Platform: x86
>         OS/Version: FreeBSD
>             Status: NEW
>           Severity: bug
>           Priority: low
>          Component: String expansion
>         AssignedTo: ph10@???
>         ReportedBy: admin@???
>                 CC: exim-dev@???

>
>
> i have condition 1 (in router):
> condition = ${if eqi{${lookup ldap{LDAP_DATA      \                            
>  ldap:///DISTRIBUTION_LISTS?name?sub?DISTRIBUTION_LISTS_FILTER}  \
>                                }}{$local_part} {yes}{no}}
> and condition 2 (in router):
> condition = ${if eqi{${lookup ldap{LDAP_DATA      \                            
>  ldap:///DISTRIBUTION_LISTS?name?sub?DISTRIBUTION_LISTS_FILTER  \
>                                }}}{$local_part} {yes}{no}}
> =================
> diff - bracket on another line, after macro DISTRIBUTION_LISTS_FILTER.
> first condition - work, two - not work.
> In debug I see
> 10:32:47 78557 Start search
> 10:32:47 78557 ldap_search failed: -7, Bad search filter
> 10:32:47 78557 lookup deferred: ldap_search failed: -7, Bad search filter
> ==================
> used exim 4.67; FreeBSD 6.2; openldap-client-2.3.37; and Win2003 AD as Ldap
> Server


I wouldn't say this was a bug, but more a case of double substitution.

If you have 2 macros defined where one them contains the entire name of
the other, and the other you use them in is just right, the actual macro
name will be substituted.

eg
MACRO_NAME_ONE="something"
MACRO_NAME="other"

Parsing this:
if MACRO_NAME then MACRO_NAME_ONE

it will actually substitute to:
if other then other_ONE

If I'm reading your bug correctly above, this is what is happening to
your LDAP queries. Try making them UNIQUE names where one name is not
contained in the other.

Ted.

PS: I have no idea where this mail is going to end up ... I assume just
replying to the email should work ;)

--
The Exim Manual
http://www.exim.org/docs.html
http://www.exim.org/exim-html-current/doc/html/spec_html/index.html