CentOS 7
Sponsored Link

Apache httpd : WebMail : RoundCube2014/09/29

 
Install RoundCube to configure web-based mail transfer system like yahoo mail. This example uses servers below for configuration of RoundCube.
+----------------------+          |          +----------------------+
|  [  www.srv.world  ] |10.0.0.31 | 10.0.0.32|  [ mail.srv.world  ] |
|     Apache httpd     +----------+----------+        Postfix       |
|      (Roundcube)     |                     |        Dovecot       |
|       MariaDB        |                     |                      |
+----------------------+                     +----------------------+

[1]
[2]
[3]
[4]
[5]
[6] Create a Database for RoundCube.
[root@www ~]#
mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.60-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# create [roundcube] database (replace 'password' to your own password you'd like to set)

MariaDB [(none)]>
create database roundcube;

Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on roundcube.* to roundcube@'localhost' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit

Bye
[7] Install and Configure RoundCube.
# install from EPEL

[root@www ~]#
yum --enablerepo=epel -y install roundcubemail php-mysql
[root@www ~]#
cd /usr/share/roundcubemail/SQL

[root@www SQL]#
mysql -u roundcube -D roundcube -p < mysql.initial.sql

Enter password:  
# MariaDB roundcube password

[root@www SQL]#
[root@www ~]#
cp -p /etc/roundcubemail/defaults.inc.php /etc/roundcubemail/config.inc.php

[root@www ~]#
vi /etc/roundcubemail/config.inc.php
# line 27: change like follows (replace your password for 'password')

$config['db_dsnw'] = 'mysql://roundcube:
password
@localhost/
roundcube
';
# line 127: specify IMAP server (STARTTLS setting)

$config['default_host'] = '
tls://mail.srv.world
';
# line 130: specify IMAP port (STARTTLS setting)

$config['default_port'] =
143
;
# line 232: specify SMTP server (STARTTLS setting)

$config['smtp_server'] = '
tls://mail.srv.world
';
# line 236: specify SMTP port (STARTTLS setting)

$config['smtp_port'] =
587
;
# line 240: change (use the same user for SMTP auth and IMAP auth)

$config['smtp_user'] = '
%u
';
# line 244: change (use the same password for SMTP auth and IMAP auth)

$config['smtp_pass'] = '
%p
';
# line 248: change (SMTP auth type)

$config['smtp_auth_type'] = '
LOGIN
';
# line 260: specify SMTP HELO host

$config['smtp_helo_host'] = '
mail.srv.world
';
# line 449: specify your domain name

$config['mail_domain'] = '
srv.world
';
# line 467: change title

$config['product_name'] = '
Server World Webmail
';
# line 470: change UserAgent

$config['useragent'] = '
Server World Webmail
';
# line 602: change to your language

$config['language'] =
ja_JP
;
# line 953: change default char-set to your language

$config['default_charset'] = '
iso-2022-jp
';
[root@www ~]#
vi /etc/httpd/conf.d/roundcubemail.conf
# line 14: IP address you permit to access

Require ip 10.0.0.0/24
[root@www ~]#
systemctl restart httpd

[8] If SELinux is enabled, change rules like follows.
[root@www ~]#
setsebool -P httpd_can_network_connect on

[9] Access to [https://(your server's hostname or IP address/)/roundcubemail/], then Roundcube login form is shown, authenticate with any user on Mail Server.
[10] Just logined. Makue sure it's possible to send or receive emails normally.
Matched Content