Installing Roundcube on FreeBSD

From ISPWiki

Jump to: navigation, search


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 the port

Install from the ports

cd /usr/ports/mail/roundcube/
make install clean

By default RoundCube uses MySQL. 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

You will be prompted to set up php5-sqlite. 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 file

Edit the rcmail_config['db_dsnw'] line

$rcmail_config['db_dsnw'] = 'sqlite:////usr/local/www/roundcube/config/sqlite.db?mode=0646';

Edit the 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 Apache

Create the /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

Restart Apache:

apachectl restart

You can verify it at

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
Was this helpful? Yes | No
Personal tools