freebsdrocks.net was started originally as nospam.mine.nu.
Requirements:
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:
[X] DOCS
[X] SSL
[X] MYSQL
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';
FLUSH PRIVILEGES;
quit
Now lets copy the default dovecot configuration file:
# cd /usr/local/www/roundcube/config
# cp /root/qmail/rc.config.inc.php.sample config.inc.php
Now we will want to open config.inc.php 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 defaults.inc.php
Now we will want to open defaults.inc.php 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.
This plugin is HIGHLY RECOMMENDED!!
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 http://freebsdrocks.net/qmail2/antiBruteForce_v2.0.tar.gz
# tar zxvf antiBruteForce_v2.0.tar.gz
# cd /usr/local/www/roundcube/config
# vi config.inc.php
Under plugins add the antibruteforce plugin line:
'antiBruteForce',
Now your plugins should look like:
'archive',
'zipdownload',
'managesieve',
'antiBruteForce',
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 config.inc.php.dist config.inc.php
# cd ~root
# fetch http://freebsdrocks.net/qmail2/Recipient-To-Contact-master.zip
# unzip Recipient-To-Contact-master.zip
# cd Roundcube-Plugin-Recipient-To-Contact-master/
# mv recipient_to_contact/ /usr/local/www/roundcube/plugins/
# cd /usr/local/www/roundcube/config
# vi config.inc.php
Now under the '// List of active plugins (in plugins/ directory)' section of the config.inc.php add the two sections below:
'jqueryui',
'recipient_to_contact',
It should now appear like the following:
// List of active plugins (in plugins/ directory)
$config['plugins'] = array(
'archive',
'zipdownload',
'jqueryui',
'recipient_to_contact',
'managesieve',
);
If you log out and log back into roundcube it should work fine.
You can find additional roundcube plugins here http://trac.roundcube.net/wiki/Plugin_Repository