Blue Flower

Sunday, 05 July 2015 13:17

Installing Roundcube

Written by
Rate this item
(0 votes)


Apache 2.4+, Mysql Server 5.1+ and php5.6. Anything that depends on php5 not already installed the port will install for you.

The Roundcube webmail software is available in FreeBSD ports. If you want to learn more about FreeBSD packages and ports, please read The FreeBSD Handbook, chapter 4.

The ports for Roundcube webmail is available in /usr/ports/mail/roundcube. To install roundcube, you will need to type the following:

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

Make sure the following options are checked:


You will also want to install the following ports if they are not installed already.

# cd /usr/ports/graphics/php56-exif
# make install clean
# cd /usr/ports/security/php56-openssl
# make install clean
# cd /usr/ports/security/php56-mcrypt
# make install clean
# cd /usr/ports/sysutils/php56-fileinfo
# make install clean

By default, roundcube is installed in /usr/local/www/roundcube/

Now, I’m going to symlink the roundcube folder as follows:

# cd /usr/local/www/apache24/data
# ln -s /usr/local/www/roundcube/ .

To create a database in mysql do the following:

# mysql -u root -p

Type in your password at the prompt. Then lets create the roundcube database.

# create database Roundcube;

Now we need to run the following 3 commands:

GRANT select,insert,update,delete,create,drop ON Roundcube.* TO myusername@localhost IDENTIFIED BY 'mypassword';

Now lets copy the default dovecot configuration file:

# cd /usr/local/www/roundcube/config
# cp /root/qmail/

Now we will want to open and change the following settings:

$config['dbdsnw'] = 'mysql://username:secretpass@localhost/database';

$config['default_host'] = 'localhost';

$config['smtp_port'] = 465;

Now lets edit some of the roundcube defaults to make things easier for new users:

# cd /usr/local/www/roundcube/config
# vi

Now we will want to open and change the following settings:

$config['show_images'] = 1;

$config['preview_pane'] = true;

Now, you need to import the database structure into your roundcube database. You can copy and paste them into phpMyAdmin or you can use the following command:

# cd /usr/local/www/roundcube/SQL
# mysql -u user -p database < mysql.initial.sql

All done, congratulations! You have installed roundcube on your server. You can access your roundcube webmail on

http://localhost/roundcube/ (You can change your localhost to your hostname).

You can now login with your username and password on your IMAP server.


The antiBruteForce Plugin is to prevent brute force user and pass attempts on Rouncube Webmail - Autoban feature with White List feature.

# cd /usr/local/www/roundcube/plugins
# fetch
# tar zxvf antiBruteForce_v2.0.tar.gz
# cd /usr/local/www/roundcube/config
# vi

Under plugins add the antibruteforce plugin line:


Now your plugins should look like:


Now let's restart apache for good measure:

# /usr/local/etc/rc.d/apache24 restart

Enabling the Roundcube Recipient To Contact Plugin

Recipient To Contact is a plugin to quickly add new contacts to address books. When sending an email to recipients that aren't in the address book, this plugin displays a form to quickly save these contacts. Inspired by Automatic Addressbook plugin.

We need to enable the jqueryui plugin first and then download the Recipient-To-Contact plugin and then enable both plugins.

# cd /usr/local/www/roundcube/plugins/jqueryui
# cp
# cd ~root
# fetch
# unzip
# cd Roundcube-Plugin-Recipient-To-Contact-master/
# mv recipient_to_contact/ /usr/local/www/roundcube/plugins/
# cd /usr/local/www/roundcube/config
# vi

Now under the '// List of active plugins (in plugins/ directory)' section of the add the two sections below:


It should now appear like the following:

// List of active plugins (in plugins/ directory)
$config['plugins'] = array(

If you log out and log back into roundcube it should work fine.

You can find additional roundcube plugins here

Read 2608 times Last modified on Friday, 14 October 2016 17:35

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.