Re: [exim] Replacing check_local_users with LDAP lookups

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Stephen Gran
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Replacing check_local_users with LDAP lookups
On Fri, Dec 22, 2006 at 03:18:01PM -0000, Gavin Henry said:
> Dear all,
>
> The last thing left to covert all of Exim over to LDAP users is the
> check_local_user part.
>
> We've got our Aliases sorted, but when we set a condition in the
> local_user router, it can't get the gid and uid of the user, as we are
> only looking to check the user is in ldap.


I use this:

LDAP_USER_EXISTS = ${lookup ldap {ldap:///ou=People,dc=lobefin,dc=net??sub?(&(accountStatus=active)(uid=${quote_ldap:$local_part}))} {$value}{}}

Followed by:

ldap_lookup:
debug_print = "R: ldap_lookup for $local_part@$domain"
driver = redirect
address_data = LDAP_USER_EXISTS
data =

Followed by some other routers that deal with the data.

> How do we set the $uid and $gid for local_delivery via LDAP?


I use:
user = ${extract{uidNumber}{$address_data}}
group = ${extract{gidNumber}{$address_data}}

HTH,
--
--------------------------------------------------------------------------
|  Stephen Gran                  | I am firm.  You are obstinate.  He is a |
|  steve@???             | pig-headed fool.   -- Katharine         |
|  http://www.lobefin.net/~steve | Whitehorn                               |

--------------------------------------------------------------------------