In order to install global sql addressbook you need:
 1. apply patch to your SquirrelMail distribution.
    global_sql_addressbook.diff provides read only SQL address book
    global_rw_sql_addressbook.diff provides writable SQL address book
     users can write addresses into database if form that they use supports
     multiple address book backends. Patch adds such support for main
     address addition form.
    This package provides patched files for vanilla SquirrelMail v.1.4.0, v.1.4.1 
    and v.1.4.2. You can make backup of original files and replace them with 
    provided versions. Read file WARNING before you use them. If you don't use 
    patches, you need to copy abook_global_database.php and 
    {your-sm-version}/functions/addressbook.php into squirrelmail's
    functions directory. If you use writable backend, you need to copy 
    {your-sm-version-rw}/src/addressbook.php to squirrelmail's src directory and use
    {your-sm-version-rw}/functions/addressbook.php instead of
    {your-sm-version}/functions/addressbook.php.
    
    global_sql_addressbook-1.4.2.diff and global_rw_sql_addressbook-1.4.2.diff
    files are for SquirrelMail 1.4.2. They are adjusted for changes made in
    SquirrelMail 1.4.2. abook_global_dabatase.php is updated to work with newer
    php pear DB libraries.
    
    abook_per_domain_rw-1.4.2.diff is special patch that allows having separate
    address book for different email domains

 2. create mysql user that will have access to address database
 3. create mysql database that will be used to store table with global addresses
 4. grant user access to that database. If you use MySQL server, you may need to 
    run 'flush privileges;' command before you can grant user access to database 
    and after you grant access privileges.
 5. create GlobAddress table in that database. Structure of the table is the same
    as personal address books. You can find commands that create apropriate 
    fields in doc/db-backend.txt document included in your SquirrelMail package. 
    If you use MySQL server, you can use SQL dump provided in addresses.mysql file. 
    You can add it with command
     mysql addresses -p -u squirrelmail < addresses.mysql
    (command adds commands from addresses.mysql into addresses table. it connects to 
    mysql as user squirrelmail and prompts to enter the password)

By default patch assumes that GlobAddress table is stored in the same database, 
that is used to store personal address books.

If you don't use SQL to store personal address books or want to store it in different 
place, open functions/addressbook.php file, find lines with 

 $addrbook_global_dsn = $addrbook_dsn;
 $addrbook_global_table = "GlobAddress";

and adjust them to your setup. $addrbook_global_dsn should contain SQL address in 
format used by PHP PEAR classes. You can find information about the format in 
doc/db-backend.txt. $addrbook_global_table should contain name of table that stores 
global addresses.

NOTE. Patches in this package are designed for SquirrelMail that uses SM_PATH variable
(v.1.3.3 or better). Don't use them for SquirrelMail v.1.2.x
