RE: [Exim] small problem with quote_ldap

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Bjurstrom, Eric
CC: 'exim-users@exim.org'
Tárgy: RE: [Exim] small problem with quote_ldap
On Tue, 1 Apr 2003, Bjurstrom, Eric wrote:

>> What was your *complete* option setting? The use of external quoting
>> affects the interpretation of \ characters. Were you using external
>> quotes?


> accept recipients = "${lookup ldap
> {ldap://exchange-server/ou=Cogentco,o=Cogent%20Communications?cn?sub?(otherm
> ailbox=${quote_ldap:smtp\$$local_part@$domain})} {$value} fail }"


OK, the quotes are confusing things here. The \ will be interpreted
when the quoted string is read.

1. Best solution is to get rid of the quotes. They are not needed. Then
that setting should work.

2. Otherwise you'll need \\ instead of \.

... but I seem to recall you said that didn't work, which is odd.

Debugging technique: make use of "exim -be" to test the expansion
(though you won't have $local_part and $domain available, you can find
out if the $ gets through, especially if you use -d as well).

What are you actually trying to do here? You are looking up the address
of the recipient - but what are you returning? Exim will expect a list
of recipients, because that's what the data for "recipients =" is
supposed to be. Unless the result of a successful lookup replicates the
incoming address, the condition is always going to fail.

If what you are trying to test is "can I look up the current recipient
in my database" you need the other syntax:

  accept recipients = ldap;ldap://exchange-server/ou=Cogentco,\
                      o=Cogent%20Communications?cn?sub?\
                      (othermailbox=${quote_ldap:smtp\$$local_part@$domain})



--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.