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 [EMAIL PROTECTED]"
> >   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 [EMAIL PROTECTED]"
  driver = accept
  domains = +local_domains
  condition = ${if match {${extract{mail}{$address_data}}}{${rxquote:[EMAIL 
PROTECTED] {1}{0}}
  transport = ldap_maildir_home

ldap_maildir_home:
  debug_print = "T: ldap_maildir_home for [EMAIL PROTECTED]"
  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   |
|  [EMAIL PROTECTED]             | in need, he is sure to remember you--   |
|  http://www.lobefin.net/~steve | the next time he's in need.             |
 --------------------------------------------------------------------------

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to