inconsistent duplicate attribute mailhost

Adding a new schema in LDAP can give you headache. I've the cure for this one:

Inconsistent duplicate attributeType: "mailHost"

This is due to a new misc.schema that is now default in Ubuntu Lucid at least (and maybe other distribution) and defines a mailhost attribute.

You'll encounter this error when trying to add another schema defining this same attribute. I have a mail.schema comming from Mandriva Directory Server, which tries to do so. And a small google reveals that qmail.schema has similar problem.

2 solutions:

  • Either remove the attribute from your new schema by deleting the attribute entry in the schema file and remove any reference to mailhost anywhere it appears in the file. I wouldn't recommend this.
  • Either remove the misc.schema from your ldap server. Cross fingers that it isn't used too much ;)

Et voilĂ  !