Installation of Roundcube Mail Web Interface on CentOS 6.3

I noticed there weren’t a lot of easy how to’s available on a quick roundcube installation on CentOS or Fedora.

Here’s a quick run down:
- Using the EPEL Repository: yum install roundcubemail - This will install the configs in /etc/roundcubemail/ and the web files in /usr/share/roundcubemail

Install and Create Roundcube Databases

mysql -u root -p

mysql> create database roundcube;  
mysql> create user roundcube;  
mysql> GRANT ALL PRIVILEGES ON roundcube.* TO [email protected] IDENTIFIED BY 'password';  
mysql> use roundcube;  
mysql> source /usr/share/doc/roundcubemail-0.7.3/SQL/mysql.initial.sql;  

Edit our database config file /etc/roundcubemail/

$rcmail_config['db_dsnw'] = 'mysql://roundcube:[email protected]/roundcube';

It’ll also be a good idea to update the default local host /etc/roundcubemail/

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

Now the yum version of roundcube mail is setup to work straight of the box with Apache. As the box I was installing this on was using Nginx as the default webserver I decided it’ll be to chuck this on port 8080 instead of tinkering with Nginx and Roundcube.

sudo perl -i -pe 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf  
sudo service httpd restart  

Lets update our iptables rules first

# allow incoming HTTP port 8080
        $iptables -A INPUT -i ${PUB_IF} -p tcp -s 0/0 --sport 1024:65535 --dport 8080 -m state --state NEW,ESTABLISHED -j ACCEPT
        $iptables -A OUTPUT -o ${PUB_IF} -p tcp --sport 8080 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
        $iptables -A INPUT -i ${PUB_IF} -p tcp --dport 8080 -m state --state NEW -m recent --set
        $iptables -A INPUT -i ${PUB_IF} -p tcp --dport 8080 -m state --state NEW -m recent --update --seconds 60  --hitcount 15 -j DROP

One thing I nearly forgot was edit your /etc/httpd/conf.d/roundcube.conf comment out the allow,deny or apply whatever blocking rules you want there.

Now send your browser to (obviously change the IP address).

Enjoy :)

comments powered by Disqus