Let me show you some examples I do have running may be you will get an idea.
I first started by adding an organization unit that would be the parent of
the mail users under that organization unit.
[EMAIL PROTECTED]
The "/usr/local/src/qmail/ldap/ldifs/mail.somedomain.cxm.ldif" file
#time /var/openldap/openldap-2.2.4/bin/ldapadd -f
/usr/local/src/qmail/ldap/ldifs/mail.somedomain.cxm.ldif -x -D
"cn=Manager,dc=somedomain,dc=net" -W
dn: ou=mail.somedomain.net,dc=somedomain,dc=net
ou: mail.somedomain.net
objectClass: top
objectClass: organizationalUnit
Then I created mail users for the above organizational unit like so:
The "/usr/local/src/qmail/ldap/ldifs/[EMAIL PROTECTED]" file
#time /var/openldap/openldap-2.2.4/bin/ldapadd -f
/usr/local/src/qmail/ldap/ldifs/[EMAIL PROTECTED] -x -D
"cn=Manager,dc=somedomain,dc=net" -W
# EXAMPLE QLDAP LDIF FILE:
# to generate a hash key /var/openldap/openldap-2.2.4/sbin/slappasswd -h
{SSHA}
# eg for aaron {SSHA}JTyAaHJRhv4o9AwBLD7kwoLEgdf7Zigk
dn:
[EMAIL PROTECTED],ou=mail.somedomain.net,dc=somedomain,dc=net
cn: Allan
sn: Kamau
objectClass: top
objectClass: person
#objectClass: inetOrgPerson
objectClass: qmailUser
mail: [EMAIL PROTECTED]
mailHost: mail.somedomain.net
mailMessageStore: @mail.somedomain.net/aaron2
#qmailDotMode: ldapwithprog
#deliveryProgramPath: /usr/home/aaron/bin/smsinformer -q
deliveryMode: normal
mailQuotaSize: 1000000
mailQuotaCount: 1000
uid: [EMAIL PROTECTED]
userPassword: {SSHA}E4kVrlKFy5irkZMjqPzWe7bAqpBWPyq8
accountStatus: active
I hope the above examples of ldifs together with the commented commands to
load the ldif will be useful.
Allan Kamau.
-----Original Message-----
From: Paul G. Weiss [mailto:[EMAIL PROTECTED]
Sent: 13 February 2004 08:05
To: [EMAIL PROTECTED]
Subject: Re: OpenLDAP 2.1
On Thu, Feb 12, 2004 at 08:25:06PM -0200, Adriano Nagelschmidt Rodrigues
wrote:
> Paul G. Weiss writes:
> > Has anyone tried getting qmail-ldap working with OpenLDAP 2.1?
>
> Sure, using OpenLDAP 2.0 isn't a good idea anymore.
>
> > The initial database creation in "Life With qmail-ldap" fails.
> > The first item in the ldif file:
> >
> > dn: dc=example,dc=com
> > objectclass: top
> >
> > with the error "no structural object class provided".
>
> Indeed, you need a structural object class ("organization" in the
> example below). Try this:
>
> dn: dc=example,dc=com
> dc: example
> o: example.com
> objectClass: dcObject
> objectClass: organization
>
>
> Regards,
>
> --
> Adriano
And if I do that, I don't need to add o=example.com to the dn? What
about all the qmail accounts that I add underneath, do they also need
to be structural?
-P