Stephen Gran on Thu, 4 Sep 2003 18:06:08 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] LDAP + Exim question


Hello all,

I am trying to get my mail server to accept messages for LDAP users.  I
will probably have more questions later when I start setting up POP,
webmail, and so forth for them as well :)

Right now, I'm stuck at getting exim to do a successful LDAP lookup.
I've added a fake user from this ldif:

dn: uid=fred,ou=People,dc=mail,dc=lobefin,dc=net
uid: fred
cn: Fred Smith
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: (changed to protect the innocent)
shadowLastChange: 11940
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/false
uidNumber: 1009
gidNumber: 1001
homeDirectory: /home/fred
gecos: Fred Smith

Regular LDAP searches (ldapsearch and slapcat) show this information
just fine, and I can look it up without -D (binddn, or user-based auth)
- I just don't get the password field that way, but that's fine.

Excerpts from exim.conf:

ldap_default_servers = localhost
LDAPSERVER = localhost
LDAPBASE = dc=mail,dc=lobefin,dc=net

# This transport is for ldap users
ldap_delivery:
  driver = appendfile
  maildir_format
  create_directory = true
  mode = 0660
  mode_fail_narrower = false
  directory = ${lookup ldap {ldap://LDAPSERVER/ou=People,LDAPBASE?homeDirectory?one?uid=${local_part}} {$value/Maildir/} fail}
  user = ${local_part}
  check_string = ""
  prefix = ""
  suffix = ""
  delivery_date_add
  envelope_to_add
  return_path_add

ldapuser:
   driver = aliasfile
   search_type = ldap
   query = "ldap://LDAPSERVER/ou=People,LDAPBASE?uid?one?uid=${local_part}";
   transport = ldap_delivery

I know some of it must be working, because emailing fred@lobefin.net gets
this in my paniclog:
2003-09-04 17:30:52 19v1gp-0002wL-00 Failed to find user "fred" from expanded string "${local_part}" from the ldap_delivery transport
(sorry about the bad wrap)

The ldap_user director is before the localuser director, so it must be
succeeding, and calling the ldap_delivery transport, which then fails.
Very aggravating.  I know that I could work around it by just changing
the directory line to:
  directory = /home/${local_part}/Maildir/

but I want the lookups to succeed, and this won't account for $HOME's in
other places.

Any suggestions?  I may just have been looking at this too long, and no
longer be able to see the obvious.

TIA,
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | You are going to have a new love        |
|  steve@lobefin.net             | affair.                                 |
|  http://www.lobefin.net/~steve |                                         |
 --------------------------------------------------------------------------
_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug