[Exim] Re: LDAP attribute expansion question

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Mark A. Hershberger
Dátum:  
Címzett: exim-users
CC: Tony Earnshaw
Tárgy: [Exim] Re: LDAP attribute expansion question
Tony Earnshaw <tonni@???> writes:

> LDAP looks up entries where objectClass=posixAccount and uid=$local_part
> agree and returns uid. For frigg, it returns "frigg, xizzy" and barfs (I
> run 'exim -d+expand -bt', so I can see why it barfs).


Do you want to get "frigg" where the $local_part is "frigg" and
"xizzy" where the $local_part is "xizzy"? Then just replace {$value}
with {$local_part}.

If you want "frigg" in both places (and, assuming that it is always
the first returned), then surround your ${lookup ldap} with something
like:

    ${sg{${lookup...}{^([^,]+).*}{\$1}}}


This is untested, though, so use care.