|
SquirrelMail, Mysql userprefs & Mysql Address book |
|
|
|
|
Written by Paul Matthews
|
|
This
how-to is telling you how to get SquirrelMail to store all the
userpref's and contact books in a mysqld database rather than a flat
file. Name: Apache HomePage: http://www.apache.org/ Function: Webserver Name: MySQL HomePage: http://www.mysql.com/ Function: MySQL, the most popular Open Source SQL database Name: PHP HomePage: http://www.php.net/ Function: developers to write dynamically generated webpages Name: Squirrelmail HomePage: http://www.squirrelmail.org Function: Web based MUA
1. Firstly let’s make sure we have all the right programs installed. rpm -qa | grep apache rpm -qa | grep squirrelmail rpm -qa | grep mysql 2. Now make sure all the right servers are started /etc/init.d/httpd start /etc/init.d/mysqld start 3. Afterwards make sure there is support of mysql in php rpm -qa | grep php-mysql if not installed it yum install php-mysql 4. Now setup mysql mysql --password="password" 5. After you are in the mysql command line copy the following information in into it. Code:
CREATE DATABASE squirrelmail; GRANT select,insert,update,delete ON squirrelmail.* TO Anonymous@localhost IDENTIFIED BY ''; USE squirrelmail; 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) ); CREATE TABLE userprefs ( user varchar(128) DEFAULT '' NOT NULL, prefkey varchar(64) DEFAULT '' NOT NULL, prefval blob DEFAULT '' NOT NULL, PRIMARY KEY (user,prefkey) ); quit
|
6. Now that mysql is setup, it's time to setup squirrelmail to use mysql, run the following command. /usr/share/squirrelmail/config/conf.pl 7. Choose ,'9' to enter the database section. SquirrelMail Configuration : Read: config.php (1.4.0) --------------------------------------------------------- Main Menu -- 1. Organization Preferences 2. Server Settings 3. Folder Defaults 4. General Options 5. Themes 6. Address Books (LDAP) 7. Message of the Day (MOTD) 8. Plugins 9. Database D. Set pre-defined settings for specific IMAP servers C. Turn color off S Save data Q Quit Command >> 9 8. Choose the '1' & '3' options and add the following information SquirrelMail Configuration : Read: config.php (1.4.0) --------------------------------------------------------- Database 1. DSN for Address Book : mysql://root:password@localhost/squirrelmail 2. Table for Address Book : address 3. DSN for Preferences : mysql://root:password@localhost/squirrelmail 4. Table for Preferences : userprefs 5. Field for username : user 6. Field for prefs key : prefkey 7. Field for prefs value : prefval R Return to Main Menu C. Turn color off S Save data Q Quit Command >> 1 9. Now just go to http://localhost/webmail and login to see if it all works.
BookMarking:
cell1
|
|
cell3 |
|
cell4
|
|

Trouble Shooting:
Go to the wiki page Go to the 'Contact Us ' Forum Go to the how-to's Support Forum
External Links:
http://www.pipeline.com.au/staff/mbowe/isp/webmail-server.htm#SQUIRRELMAIL |
|
Last Updated ( Sunday, 03 June 2007 )
|