
                  ldapuserdata plugin for Squirrelmail 1.2.x

   Based on the [1]SquirrelMail [2]Retrieve User Data Plugin (0.4/0.5)
   by Thijs Kinkhorst / Tyler Akins / Ralf Kraudelt (kraude at
   wiwi.uni-rostock.de)

Introduction

   There are two backends for Squirrelmail: the standard backend stores
   users' profile/preferences in text files (file_prefs.php), and the
   MySQL one stores them in a MySQL database (file_db.php).

   This one adds an LDAP backend. However, things are treated much
   differently, due to the difference in nature between LDAP and other
   databases. Namely: LDAP writes are expensive. Extensive caching is
   used to reduce the overhead on the LDAP server, especially in a setup
   with a lot of users.

   This makes a big difference, from the user's point of view. Whenever
   changing some option, the change is for the current session only. The
   change will only be saved permanently, if and only if the user logs
   out from Squirrelmail, thus ending the session.

   If having automatically saved preferences is important, then this
   plugin might not be for you. (Or you can modify setPref() to write
   back the changes to LDAP immediately and be prepared for a heavy
   loaded LDAP server)..

   You may ask, why put the user's profile in LDAP, in the first place?
   One word: centralization. There is a centralized store for
   preferences. If you have multiple webmail machines, they all get the
   same preferences for each user (one can achieve this with the MySQL
   backend too). No need for NFS'ing the data directory. Also, we
   connected to the LDAP server anyway, to get the cn (real name), mail
   (email address) and mailHost (IMAP server address to connect to). Even
   if there are applications other than squirrelmail that need this data
   in the future, they can get them. Last but not least, the complexity
   is reduced in that a single database is used; no other text files nor
   MySQL databases that all have some common information with LDAP.

   Here's a poor attempt for a block diagram of what happens behind the
   curtains:

   ldapuserdata diagram

   (Also available in [3]Dia drawing native format and [4]encapsulated
   postscript (.eps)).

   The code was largely based on [5]Ralf Kraudelt's retrieveuserdata
   plugin (v0.4). If you are looking for a solution based on MySQL, use
   the MySQL backend for Squirrelmail and additionally the MySQL module
   from retrieveuserdata.

Status

   I consider this alpha software, i.e. internal/developers testing only,
   and definitely not for a production environment. Features (and bugs)
   are added every other day. Use it only for testing and reporting bugs.
   Insert standard GPL_Disclaimer(); here.

Download

     * Not yet.

Installation

   Prerequisites:
     * LDAP Server
     * Working Squirrelmail setup (i.e. with working IMAP server).

   Word of warning: This is one of them intrusive plugins, in that you'll
   have to replace a file of the original Squirrelmail distribution with
   the one I'm providing you with. Having said that, installation is
   pretty much straightforward.
    1. Untar the distribution under the plugins directory of your
       Squirrelmail.
    2. Edit config.php to suit your preferences. The file is
       self-commented.
    3. Incorporate the provided schema to your LDAP server. [Write some
       more here]
    4. Substitute the default functions/file_prefs.php with
       ldap_prefs.php. Make a backup of your file_prefs.php first:
cd ../functions
mv file_prefs.php file_prefs.php.original
mv ../plugins/ldapuserdata/file_prefs.php ./

History

  0.1

     * First public release.

TODO

     * Beta testing!

Support

   If you need help with this, or see improvements that can be made,
   please email me at the address below, or post a message to
   [6]squirrelmail-plugins mailing list. This plugin, as is the case with
   all [7]SquirrelMail plugins, is not directly supported by the
   developers.

Author


    [8]Alexandros Vellis, [9]Network Operations Centre, [10]University
    of Athens
    ([11]Personal home page).

Thanks, Credits

     * Based on retrieveuserdata code from [12]Ralf Kraudelt. Many thanks
       for giving me a base to start from.
     * Nikos Voutsinas (nvoutsin at noc uoa gr), for helping with the
       LDAP schema.

References

   1. http://www.squirrelmail.org/
   2. http://www.squirrelmail.org/plugin_view.php?id=11
   3. file://localhost/var/www/squek/plugins/ldapuserdata/doc/ldap_prefs.dia
   4. file://localhost/var/www/squek/plugins/ldapuserdata/doc/ldap_prefs.eps
   5. mailto:kraude@wiwi.uni-rostock.de
   6. http://lists.sourceforge.net/lists/listinfo/squirrelmail-plugins
   7. http://www.squirrelmail.org/plugins.php
   8. mailto:avel@users.sourceforge.net
   9. http://www.noc.uoa.gr/
  10. http://www.uoa.gr/
  11. http://www.pspa.uoa.gr/~avellis/
  12. mailto:kraude@wiwi.uni-rostock.de
