]> Thunderbird LDAP auto-complete 🌐:aligrant.com

Thunderbird LDAP auto-complete

Alastair Grant | Monday 5 August 2013

I used LDAP for my address book, which allows me to access the same address book from multiple locations. Thunderbird is my primary mail client, which will give you auto-complete contacts from LDAP searches when you start typing in names into a new email.

This all works well apart from when I want to e-mail my Dad, as I never refer to him by name, I type "Dad" and nothing comes up. I have this entry in the "mozillaNickname" field in LDAP, and indeed when looking at the address book entry you'll see the nickname displayed correctly.

In order to get Mozilla to include the nickname in the search, you have to override the default search method. Which involves the config-editor. How to get into this I won't post here, as if you're not comfortable with it, you probably should keep clear.

You need to create a new entry - specifically for your LDAP server. Creating a default entry doesn't seem to work.

ldap_2.servers.[ADDRESSBOOK].autoComplete.filterTemplate

Replacing the relevant section with your address book name.

You can then configure the LDAP search string, using "%v" as the input from auto-complete. So, for example, this string will match various fields, using an asterisk wildcard to avoid having to enter the full field information before results are returned:

(|(mozillaNickname=%v*)(cn=%v*)(sn=%v*)(mail=%v*))


You may also want to use givenName if your common name (cn) doesn't start with a first name.

 

Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.