Re: [exim] ldap returned data format

Top Pagina
Delete this message
Reply to this message
Auteur: Magnus Holmgren
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] ldap returned data format
On söndagen den 13 januari 2008, Jeremy Harris wrote:
> Phil Pennock wrote:
> > Exim requires you to quote at the point of use, since different services
> > require different quoting. So there are ${quote_foo:...} expansion
> > operators for various foo. For Exim's own parsing, ${quote:...} is
> > useful, for putting the string into double-quotes as needed.
> >
> >> ${lookup
> >> ldap{ldap:///ou=People,dc=spodhuis,dc=org?objectClass?sub?cn=Phil%20Penn
> >>ock}}
> >
> > inetOrgPerson, posixAccount, top
> >
> >> ${quote:${lookup
> >> ldap{ldap:///ou=People,dc=spodhuis,dc=org?objectClass?sub?cn=Phil%20Penn
> >>ock}}}
> >
> > "inetOrgPerson, posixAccount, top"
>
> I don't see how that helps. If the lookup returns me
>
> accountclass=2 contenthdrwarn="^((?i)date:\\s*),
> ^((?i)subject:\\s+).*((?i)snark)"
>
> then quoting it further won't help me.


If a value can contain ", " I'm afraid you're out of luck. Either you make
sure that no value contains ", ", perhaps by putting the space inside [ ] if
it's in a regexp, or change the separator string in src/lookups/ldap.c line
683 and recompile Exim.

I hope Exim 5 will feature lists and perhaps other data structures. Until
then, one plan might be to implement the "set output list separator"
mechanism, available with the dnsdb lookup, in other lookups as well.

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)


"Exim is better at being younger, whereas sendmail is better for
Scrabble (50 point bonus for clearing your rack)" -- Dave Evans