From: <jer...@us...> - 2007-03-04 02:08:12
|
Revision: 12302 http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=12302&view=rev Author: jervfors Date: 2007-03-03 18:07:59 -0800 (Sat, 03 Mar 2007) Log Message: ----------- Moving "doc/db-backend.txt" to the administrator's manual. Modified Paths: -------------- branches/SM-1_4-STABLE/squirrelmail/config/config_default.php branches/SM-1_4-STABLE/squirrelmail/doc/index.html Removed Paths: ------------- branches/SM-1_4-STABLE/squirrelmail/doc/db-backend.txt Modified: branches/SM-1_4-STABLE/squirrelmail/config/config_default.php =================================================================== --- branches/SM-1_4-STABLE/squirrelmail/config/config_default.php 2007-03-04 02:05:53 UTC (rev 12301) +++ branches/SM-1_4-STABLE/squirrelmail/config/config_default.php 2007-03-04 02:07:59 UTC (rev 12302) @@ -914,13 +914,13 @@ /*** Database ***/ /** - * Read doc/database.txt in order to get more information + * Read the administrator's manual in order to get more information * about these settings. */ /** * Database-driven private addressbooks * DSN (Data Source Name) for a database where the private - * addressbooks are stored. See doc/db-backend.txt for more info. + * addressbooks are stored. See the administrator's manual for more info. * If it is not set, the addressbooks are stored in files * in the data dir. * The DSN is in the format: mysql://user:pass@hostname/dbname @@ -1039,4 +1039,4 @@ * sent and regular output to begin, which will majorly screw * things up when we try to send more headers later. */ -?> +?> \ No newline at end of file Deleted: branches/SM-1_4-STABLE/squirrelmail/doc/db-backend.txt =================================================================== --- branches/SM-1_4-STABLE/squirrelmail/doc/db-backend.txt 2007-03-04 02:05:53 UTC (rev 12301) +++ branches/SM-1_4-STABLE/squirrelmail/doc/db-backend.txt 2007-03-04 02:07:59 UTC (rev 12302) @@ -1,126 +0,0 @@ -$Id$ - - -Storing private addressbooks and preferences in a database -========================================================== - - -On sites with many users you might want to store your user data in a -database instead of in files. This document describes how to configure -SquirrelMail to do this. - -Methods for storing both personal addressbooks and user preferences in -a database is included as a part of the distribution. - - - -Configuring PEAR DB -------------------- - -For this to work you must have the PEAR classes installed, these are -part of PHP. Once these are installed you must have sure the directory -containg them is a part of your PHP include path. See the PHP -documentation for information on how to do that. -Under Mandrake Linux the PEAR classes are installed as part of the -php-devel package and under FreeBSD they are installed as part of -the mod_php4 or php4 port/package. In Debian, you can install the -php4-pear package. I'm afraid I have no information on other systems -at the present time. - - -Configuring addressbooks in database ------------------------------------- - -First you need to create a database and a table to store the data in. -Create a database user with access to read and write in that table. - -For MySQL you would normally do something like: - - (from the command line) - # mysqladmin create squirrelmail - - (from the mysql client) - mysql> GRANT select,insert,update,delete ON squirrelmail.* - TO squirreluser@localhost IDENTIFIED BY 'sqpassword'; - -The table structure should be similar to this (for MySQL): - - CREATE TABLE address ( - owner varchar(128) DEFAULT '' NOT NULL, - nickname varchar(16) DEFAULT '' NOT NULL, - firstname varchar(128) DEFAULT '' NOT NULL, - lastname varchar(128) DEFAULT '' NOT NULL, - email varchar(128) DEFAULT '' NOT NULL, - label varchar(255), - PRIMARY KEY (owner,nickname), - KEY firstname (firstname,lastname) - ); - -and similar to this for PostgreSQL: -CREATE TABLE "address" ( - "owner" varchar(128) NOT NULL, - "nickname" varchar(16) NOT NULL, - "firstname" varchar(128) NOT NULL, - "lastname" varchar(128) NOT NULL, - "email" varchar(128) NOT NULL, - "label" varchar(255) NOT NULL, - CONSTRAINT "address_pkey" PRIMARY KEY ("nickname", "owner") -); -CREATE UNIQUE INDEX "address_firstname_key" ON "address" - ("firstname", "lastname"); - - -Next, edit your configuration so that the address book DSN (Data Source -Name) is specified, this can be done using either conf.pl or via the -administration plugin. The DSN should look something like: - - mysql://squirreluser:sqpassword@localhost/squirrelmail or - pgsql://squirreluser:sqpassword@localhost/squirrelmail - -From now on all users' personal addressbooks will be stored in a -database. - -Global address book uses same table format as the one used for personal -address book. You can even use same table, if you don't have user named -'global'. - - -Configuring preferences in database ------------------------------------ - -This is done in much the same way as it is for storing your address -books in a database. - -The table structure should be similar to this (for MySQL): - - CREATE TABLE userprefs ( - user varchar(128) DEFAULT '' NOT NULL, - prefkey varchar(64) DEFAULT '' NOT NULL, - prefval BLOB DEFAULT '' NOT NULL, - PRIMARY KEY (user,prefkey) - ); - -and for PostgreSQL: -CREATE TABLE "userprefs" ( - "username" varchar(128) NOT NULL, - "prefkey" varchar(64) NOT NULL, - "prefval" text, - CONSTRAINT "userprefs_pkey" PRIMARY KEY ("prefkey", "username") -); - -Next, edit your configuration so that the preferences DSN (Data Source -Name) is specified, this can be done using either conf.pl or via the -administration plugin. The DSN should look something like: - - mysql://squirreluser:sqpassword@localhost/squirrelmail or - pgsql://squirreluser:sqpassword@localhost/squirrelmail - -Note that when using the above PostgreSQL schema, you also need to change -the prefs_user_field variable in config.php from the default 'user' to -'username'. - -From now on all users' personal preferences will be stored in a -database. - -Default preferences can be set by altering the $default array in -db_prefs.php. Modified: branches/SM-1_4-STABLE/squirrelmail/doc/index.html =================================================================== --- branches/SM-1_4-STABLE/squirrelmail/doc/index.html 2007-03-04 02:05:53 UTC (rev 12301) +++ branches/SM-1_4-STABLE/squirrelmail/doc/index.html 2007-03-04 02:07:59 UTC (rev 12302) @@ -46,13 +46,6 @@ This document describes how to use this new code, and the requirements. </dd> - <dt><a href="db-backend.txt">Database Backend</a></dt> - <dd> - SquirrelMail allows you to store user's preferences and address books - in database that is compatible with PHP Pear DB libraries. This document - describes how to setup database. - </dd> - <dt><a href="presets.txt">Specific IMAP server setups</a></dt> <dd> SquirrelMail configuration utility allows adjusting settings for selected This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |