Re: [exim] Replacing check_local_users with LDAP lookups

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Stephen Gran
Date:  
À: exim-users
Sujet: Re: [exim] Replacing check_local_users with LDAP lookups
On Fri, Dec 22, 2006 at 04:49:40PM -0000, Gavin Henry said:
> <quote who="Stephen Gran">
> > 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 ....
> >
> > 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.
>
> And these can deliver to maildir, using the uid/gid captured below?


I use roughly the following (some local details elided):

ldap_user:
debug_print = "R: ldap_user for $local_part@$domain"
driver = accept
domains = +local_domains
condition = ${if match {${extract{mail}{$address_data}}}{${rxquote:$local_part}@$domain} {1}{0}}
transport = ldap_maildir_home

ldap_maildir_home:
debug_print = "T: ldap_maildir_home for $local_part@$domain"
driver = appendfile
directory = ${extract{homeDirectory}{$address_data}}/Maildir
delivery_date_add
envelope_to_add
return_path_add
create_directory
maildir_format
user = ${extract{uidNumber}{$address_data}}
group = ${extract{gidNumber}{$address_data}}
mode = 0600
mode_fail_narrower = false

Take care,
--
--------------------------------------------------------------------------
|  Stephen Gran                  | Cheit's Lament:  If you help a friend   |
|  steve@???             | in need, he is sure to remember you--   |
|  http://www.lobefin.net/~steve | the next time he's in need.             |

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