1

I have an application that stores contacts in OpenLDAP. It uses the c attribute to store a string describing a country name. The syntax of c only allows a two-letter country code, but the application uses full country names. Therefore the attribute it should be using is co, or friendlyCountryName. Unfortunately I cannot change this application. (It's Mozilla).

I am looking for a way to make this work. I can, of course, change the schema definition of c to that of co, but that seems bad practice. I could also disable schema checking, but that is even worse.

I have also tried using the rwm overlay to map c onto co, which works (as in: client saves c, database contains co), but then the syntax of c is still enforced, so that doesn't work.

So, the best option I have now is to change the syntax of c in the core schema. But I am curious: are there better ways to work around this?

chicks
  • 3,793
  • 10
  • 27
  • 36
roelvanmeer
  • 1,764
  • 3
  • 13
  • 27
  • By Mozilla do you mean [Thunderbird](https://support.mozilla.org/en-US/products/thunderbird)? – 84104 Apr 16 '16 at 18:17
  • Yes. I'm using the official Mozilla schema spec, which can be found [here](https://wiki.mozilla.org/MailNews:Mozilla_LDAP_Address_Book_Schema) – roelvanmeer Apr 18 '16 at 05:52

1 Answers1

0

If your LDAP server is configured with the mozillaAbPersonAlpha schema, you can tack the AUX objectClass: mozillaAbPersonAlpha onto your entries (provided they have cn) and then use the mozillaHomeCountryName attribute.

84104
  • 12,905
  • 6
  • 45
  • 76
  • How will that help? Thunderbird will still use the `c` attribute for storing the country name. It's not that _I_ need a place to store the full country name, I need a way to let Thunderbird store the full country name in the attribute that it uses for that (which is `c`). – roelvanmeer Apr 19 '16 at 07:53