Re: qmail-ldap and auth_smtp handling usernames differently between versions.
Edward Capriolo <[email protected]>
| Newsgroups | gmane.mail.qmail.ldap |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Nov 11, 2009 at 2:53 PM, Claudio Jeker <[email protected]> wrote: > On Wed, Nov 11, 2009 at 01:01:34PM -0500, Edward Capriolo wrote: >> Hello list, >> >> I have servers running an older version of qmail-ldap and (built from >> source, build from FreeBSD ports?). I am in the middle of an upgrade >> and have noticed that qmail-ldaplookup is working differently (latest >> build). This manifests on the user end as mail clients were configured >> for '[email protected]' >> But qmail-auth is only accepting 'ecapriolo' >> >> New Server: >> [root@nymail1 /service/qmail-smtpd-5190]# qmail-ldaplookup -u ecapriolo >> Searching ldap for: (&(objectClass=qmailUser)(uid=ecapriolo)) >> under dn: o=domain,c=US >> Found 1 entry: >> >> dn: [email protected],ou=user,ou=domain.com,o=domain,c=US >> ------------------------------------------------------- >> objectClass: top >> objectClass: person >> objectClass: qmailUser >> objectClass: inetOrgPerson >> objectClass: shadowAccount >> objectClass: sambaSamAccount >> objectClass: posixAccount >> objectClass: ldapPublicKey >> objectClass: ciscoVPNUser >> mail: [email protected] >> uid: ecapriolo >> >> >> Old server.... >> [root@mail2 smtpalt]# /var/qmail/bin/qmail-ldaplookup -u [email protected] >> Searching ldap for: (&(objectClass=qmailUser)([email protected])) >> under dn: o=domain,c=US >> Found 1 entry: >> >> dn: [email protected],ou=user,ou=domain.com,o=domain,c=US >> ------------------------------------------------------- >> objectClass: top >> objectClass: person >> objectClass: qmailUser >> objectClass: inetOrgPerson >> objectClass: shadowAccount >> objectClass: sambaSamAccount >> objectClass: posixAccount >> objectClass: ldapPublicKey >> objectClass: ciscoVPNUser >> mail: [email protected] >> mail: [email protected] >> >> Side note here: mail= is our naming attribute in openldap. All the >> control/ldap related files are identical between the old and the new >> servers. >> >> What changed? >> Is this something I can fix with a control file? >> Recompile? >> > > You modified you're local version. -u does a uid lookup and in the first > case [email protected] is used, in the other case > [email protected] is used for searches. > Have a look at qmail-ldap.h and the LDAP_UID definition to change it to > mail (at least I hope it is the place you need looking). Afterwards > recompile. > > -- > :wq Claudio > Claudio, Brilliant! That was it. Thank you again for your always excellent support. qmail-ldap.h (default) +#define LDAP_DOTMODE "qmailDotMode" +#define LDAP_UID "uid" +#define LDAP_PASSWD "userPassword" qmail-ldap.h (us) #define LDAP_DOTMODE "qmailDotMode" #define LDAP_UID "mail" #define LDAP_PASSWD "userPassword" :)