Dovecot /postfix with Roundcube WebUI

From vpsget wiki
Revision as of 16:17, 25 October 2013 by Vq (talk | contribs)
Jump to: navigation, search

Following guide was tested on CentOS 6.

Install epel repository:

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

Remove sendmail and install dovecot:

yum remove sendmail
yum install postfix dovecot
chkconfig dovecot on
chkconfig postfix on
service dovecot start

Install php if not yet installed:

yum install php

Install php extentions:

yum install php-xml php-pdo php-mbstring php-mcrypt php-intl php-mysql

Add to your php.ini:

extension=dom.so
extension=pdo.so

You can locate your working php.ini with the command:

php -i | grep 'Configuration File'

Restart Apache

service httpd restart

Install some database server. In this guide we are using MySQL.

yum install mysql-server
chkconfig mysqld on
service mysqld start

Set mysql root password:

mysqladmin -u root password <password>

Enter to mysql:

mysql -p

Create user for Rouncube:

CREATE USER 'roundcube'@'localhost' IDENTIFIED BY 'password';

Create database:

CREATE DATABASE roundcubemail;

Grant privileges:

GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit

Download roundcube and extract it in web accessible directoty:

cd /var/www/html
wget http://freefr.dl.sourceforge.net/project/roundcubemail/roundcubemail/0.9.5/roundcubemail-0.9.5.tar.gz
tar xvf roundcubemail-0.9.5.tar.gz

For newest version refer to: http://roundcube.net/

Now you can give some shorter name to it, for example - webmail:

mv roundcubemail-0.9.5 webmail

Go to web installer using url: http://YourDomainOrIP/webmail/installer

Press "NEXT" at the bottom of the page

Find "Database setup" section and set password for database that you've created in previous steps. You may also configure other options in this step.

Press "CREATE CONFIG" at the bottom of the page.

Two files will be generated and you should place them to your roundcube folder. In our case it is /var/www/webmail/config

cd /var/www/webmail/config
nano main.inc.php      #Copy content of the generated file from web page
nano db.inc.php        #Copy content of the generated file from web page

Press "CONTINUE"

Perform test and finish installation.