Installing Roundcube webmail
From ISPWiki
Contents |
Installing a RoundCube email client on the server running FreeBSD
(checked 02.28.2010 on FreeBSD 6.3 i386 Soft2006) RoundCube is a web-based email client similar to SquirrelMail.
The following article goes you through the steps you need to follow to install it as an ISPmanager client.
Setting up a port
Installing from the ports
cd /usr/ports/mail/roundcube/ make install clean
By default RoundCube uses MySQL to store user data. Clear the check [ ] MYSQL and select [X] SQLITE:
[ ] MYSQL Use MySQL backend [ ] PGSQL Use PostgreSQL backend [X] SQLITE Use SQLite backend [ ] SSL Enable SSL support (imaps or google spellcheck) [ ] LDAP Enable LDAP support (address book) [ ] PSPELL Enable PSpell support (internal spellcheck) [ ] NSC Install network spellchecker [ ] AUTOCOMP Enable autocomplete in login form
While installing you will be prompt to set up and select a php5-sqlite extension. Install it and leave the default config options.
Editing the Roundcube configuration file
Go to the directory where the configuration files are located /usr/local/www/roundcube/config
Edit the db.inc.php file
Edit the rcmail_config['db_dsnw'] line
$rcmail_config['db_dsnw'] = 'sqlite:////usr/local/www/roundcube/config/sqlite.db?mode=0646';
Edit the main.inc.php file - specify a default host to connect.
$rcmail_config['default_host'] = 'localhost';
Add privileges to create a database from the script:
chown www /usr/local/www/roundcube/config
Configuring the Apache web-server
Create a /usr/local/etc/apache22/Includes/roundcube.conf file:
<IfModule mod_php5.c>
Alias /roundcube /usr/local/www/roundcube
<Directory /usr/local/www/roundcube>
Order allow,deny
Allow from all
RemoveHandler .php .php3 .php4 .phtml
AddType application/x-httpd-php .php .php3 .php4 .phtml
php_admin_value open_basedir /usr/local/www/roundcube
php_admin_value upload_tmp_dir /usr/local/www/roundcube/temp
php_admin_value session.save_path /usr/local/www/roundcube/temp
DirectoryIndex index.php
</Directory>
</IfModule>
Restart Apache:
apachectl restart
You can verify it at https://188.120.226.75/roundcube/
Customizing ISPmanager
To enable the WebMail link (SquirrelMail is used by default) edit the /usr/local/ispmgr/etc/ispmgr.conf configuration file and change the path to this file
extaction webmail /roundcube/
Restart ISPmanager
killall ispmgr
