LDAP: no structural object class provided when creating Postfix Alias

Operating system: Debian
OS version: 10

Hi, I am trying to set up LDAP on my Virtualmin instance. I have followed the guide, made sure both the misc and nis schema’s are enabled and loaded. The creation of users and groups work perfectly fine and I can validate everything succesfullyt in the LDAP Client module.

This is the error message that I get when creating an alias:

Failed to save alias : LDAP add of mailLocalAddress=test-domain.tld,dc=Aliases,dc=hosting,dc=tld failed : no structural object class provided

Over here, I tried to create an alias for test@domain.tld, thus test-domain.tld.
What can I do to fix the issue?

Kind regards,
Micha de Vries

@Joe Sorry for my impatience, but I have a few clients that are currently struggling to create new email adresses and aliases. Have you got any idea onto what is going wrong?

Okay, I know this sounds like a very very bad idea but it worked and fixed my issue. The only way I was able to find online to enable a schema/ldif file was on this way:

 ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/misc.ldif

That resulted in the following error:

adding new entry "cn=misc,cn=schema,cn=config"
ldap_add: Other (e.g., implementation specific) error (80)
        additional info: olcAttributeTypes: Duplicate attributeType: "2.16.840.1.113730.3.1.13"

I used the following command to find the duplicate:

cd /etc/ldap && grep -r '2.16.840.1.113730.3.1.13' *

which resulted in the following

schema/misc.ldif:olcAttributeTypes: {0}( 2.16.840.1.113730.3.1.13 NAME 'mailLocalAddress' DESC
schema/misc.schema:attributetype ( 2.16.840.1.113730.3.1.13
slapd.d/cn=config/cn=schema/cn={4}misc.ldif:olcAttributeTypes: {0}( 2.16.840.1.113730.3.1.13 NAME 'mailLocalAddress' DES

I eventually ended up editing: /etc/ldap/slapd.d/cn=config/cn=schema/cn={4}misc.ldif by changing AUXALIRY to STRUCTURAL, restarted slapd and it worked.

This is not a recommended solution, but it works :wink:

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.