Thunderbird: mass activate and configure ldap address book

Posted on 2009-12-30
Last Modified: 2013-12-24

I'm looking for a way to deploy and configure the thunderbird address book with a ldap server.
The ldap server all ready exist, I know how to conf thunderbird manually, but we have more than 200 accounts, so i have to script it.
All stations are linux.
Thanks a lot,

Question by:elhijo
    1 Comment

    Accepted Solution

    I'll answer myself
    What a shame that I can't win my points ;)
    I just added those lines in ~/.thunderbird/xxx.default/prefs,js

    user_pref("ldap_2.autoComplete.directoryServer", "ldap_2.servers.ldap");
    user_pref("ldap_2.autoComplete.useDirectory", true);
    user_pref("ldap_2.prefs_migrated", true);
    user_pref("ldap_2.servers.bix61.position", 0);
    user_pref("ldap_2.servers.default.attrmap.HomeAddress", "homePostalAddress,mozillaHomeStreet");
    user_pref("ldap_2.servers.default.attrmap.SecondEmail", "homeMail,mozillaSecondEmail,xmozillasecondemail");
    user_pref("ldap_2.servers.default.attrmap.WorkAddress", "postalAddress,street,streetaddress,postOfficeBox");
    user_pref("ldap_2.servers.default.filename", "default.mab");
    user_pref("ldap_2.servers.default.replication.lastChangeNumber", 0);
    user_pref("ldap_2.servers.default.uri", "moz-abldapdirectory://default.mab");
    user_pref("ldap_2.servers.history.replication.lastChangeNumber", 0);
    user_pref("ldap_2.servers.ldap.position", 0);
    user_pref("ldap_2.servers.ldap_1.auth.savePassword", true);
    user_pref("ldap_2.servers.ldap_1.description", "ldap");
    user_pref("ldap_2.servers.ldap_1.filename", "abook-1.mab");
    user_pref("ldap_2.servers.ldap_1.replication.lastChangeNumber", 0);
    user_pref("ldap_2.servers.ldap_1.uri", "ldap://servername:389/dc=example,dc=com??sub?(objectclass=*)");
    user_pref("ldap_2.servers.pab.replication.lastChangeNumber", 0);
    user_pref("ldap_2.servers.test.position", 0);

    The two lines containing attrmap is only to map ldap attributes to thunderbird's expected attributes....

    It's not a very clean way but it works....

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
    Creating and Managing Databases with phpMyAdmin in cPanel.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now