With a little side of applesauce...

Sunday, January 28, 2007

OpenLDAP - additional info: no structural object class provided

I am working with Virtual Domain Router Design by kos:

http://www.bastard.net/~kos/mailrouter/

And kept getting the following error when uploading a mailSetting LDIF like:

dn: mailSetting=host_accept_relay,o=top
objectClass: mailSetting
mailSetting: host_accept_relay
mailSettingValue: localhost
mailSettingValue: 127.0.0.1
mailSettingValue: 207.46.197.102

The error was:

ldap_add: Object class violation (65)
additional info: no structural object class provided

I narrowed it down to the objectClass definition for mailSetting in mailrouter.schema:

objectclass ( 1.3.6.1.4.1.7914.1.2.1.100 NAME ‘mailSetting’
DESC ‘Mail router settings’ SUP top AUXILIARY
MUST ( mailSetting )
MAY ( mailSettingValue $ description ) )
When I changed the AUXILIARY to STRUCTURAL, restarted slapd, and I was able to load the object into the directory tree :)

I’m modifying kos’ tree by creating a people.base container for all of my user accounts, and then linking them into the mail domains at:

ou=mail,ou=Applications,dc=base

I am then placing the exim4 configuration settings (mailSetting) in the following container:

ou=eximConfig,ou=mail,ou=Applications,dc=base

This helps me to separate my web publishers and email users :)

No comments: