LLPHP: dnf install php-mbstring php-dom php-json php-xml php-common php-cli php-pdo php-gd php-imap php-intl php-ldap php-mysqlnd php-pear php-pear-Net-IDNA2 php-pear-Net-SMTP php-pear-Net-Socket php-pear-Auth-SASL -y
Create a Database for RoundCube.
[root@www ~]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 56Server version: 10.5.13-MariaDB MariaDB ServerCopyright (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 setMariaDB [(none)]> create database roundcubemail;Query OK, 1 row affected (0.000 sec)MariaDB [(none)]> grant all privileges on roundcubemail.* to roundcube@'localhost' identified by 'password';Query OK, 0 rows affected (0.083 sec)MariaDB [(none)]> flush privileges;Query OK, 0 rows affected (0.001 sec)MariaDB [(none)]> exitBye8]
Install and Configure RoundCube.
# install from EPEL
[root@www ~]# dnf --enablerepo=epel -y install roundcubemail php-mysqlnd[root@www ~]# cd /usr/share/roundcubemail/SQL[root@www SQL]# mysql -u roundcube -D roundcubemail -p < mysql.initial.sqlEnter password: # MariaDB roundcube password[root@www SQL]# cd[root@www ~]# cp -p /etc/roundcubemail/config.inc.php.sample /etc/roundcubemail/config.inc.php[root@www ~]# vi /etc/roundcubemail/config.inc.php
# lie 28 : set DB connection info# replace to your own password for [password] section$config['db_dsnw'] = 'mysql://roundcube:password@localhost/roundcubemail';# line 41 : specify IMAP server# with STARTTLS connection#$config['default_host'] = 'tls://mail.worldcm.net';$config['default_host'] = 'localhost';# line 55 : specify SMTP server# with STARTTLS connection#$config['smtp_server'] = 'tls://mail.worldcm.net';$config['smtp_server'] = 'localhost';# line 58 : specify SMTP port# with STARTTLS connection#$config['smtp_port'] = 587;$config['smtp_port'] = 25;# line 62 : confirm# use the same user for SMTP auth and IMAP auth$config['smtp_user'] = '%u';# line 66 : confirm# use the same password for SMTP auth and IMAP auth$config['smtp_pass'] = '%p';# line 73 : change to any title you like$config['product_name'] = 'Worldcm Webmail';# add follows to the end# specify IMAP port (with STARTTLS connection)$config['default_port'] = 143;# specify SMTP auth type$config['smtp_auth_type'] = 'LOGIN';# specify SMTP HELO host$config['smtp_helo_host'] = 'mail.worldcm.net';# specify domain name$config['mail_domain'] = 'worldcm.net';# specify UserAgent$config['useragent'] = 'Worldcm Webmail';# specify SMTP and IMAP connection option$config['imap_conn_options'] = array( 'ssl' => array( 'verify_peer' => true, 'CN_match' => 'worldcm.net', 'allow_self_signed' => true, 'ciphers' => 'HIGH:!SSLv2:!SSLv3', ),);$config['smtp_conn_options'] = array( 'ssl' => array( 'verify_peer' => true, 'CN_match' => 'worldcm.net', 'allow_self_signed' => true, 'ciphers' => 'HIGH:!SSLv2:!SSLv3', ),);-----------------------------------------------------------// SMTP password (if required) if you use %p as the password Roundcube// will use the current user's password for login$config['smtp_pass'] = '%p';// provide an URL where a user can get support for this Roundcube installation// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!$config['support_url'] = '';// Name your service. This is displayed on the login screen and in the window title$config['product_name'] = 'WELCOME TO TexTile GROUP LIMITED WEBMAIL';// This key is used to encrypt the users imap password which is stored// in the session record. For the default cipher method it must be// exactly 24 characters long.// YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS$config['des_key'] = 'rcmail-!24ByteDESkey*Str';// List of active plugins (in plugins/ directory)$config['plugins'] = [ 'archive', 'zipdownload',];// skin name: folder from skins/$config['skin'] = 'elastic';$config[‘max_message_size’] = ‘50M’;#------------------------------------------------### specify IMAP port (with STARTTLS connection)$config['default_port'] = 143;# specify SMTP auth type$config['smtp_auth_type'] = 'LOGIN';# specify SMTP HELO host$config['smtp_helo_host'] = 'mail.textile.com';# specify domain name$config['mail_domain'] = 'textile.com';# specify UserAgent$config['useragent'] = 'Textile Webmail';# specify SMTP and IMAP connection option$config['imap_conn_options'] = array( 'ssl' => array( 'verify_peer' => true, 'CN_match' => 'textile.com', 'allow_self_signed' => true, 'ciphers' => 'HIGH:!SSLv2:!SSLv3', ),);$config['smtp_conn_options'] = array( 'ssl' => array( 'verify_peer' => true, 'CN_match' => 'textile.com', 'allow_self_signed' => true, 'ciphers' => 'HIGH:!SSLv2:!SSLv3', ),); ----------------------------------------------
[root@www ~]# vi /etc/httpd/conf.d/roundcubemail.conf
## Round Cube Webmail is a browser-based multilingual IMAP client#Alias /webmail /usr/share/roundcubemail# Define who can access the Webmail# You can enlarge permissions once configured<Directory /usr/share/roundcubemail/> <IfModule mod_authz_core.c> # Apache 2.4 Require all granted # Require local </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from all Allow from 127.0.0.1 Allow from ::1 </IfModule></Directory># Define who can access the installer# keep this secured once configured<Directory /usr/share/roundcubemail/installer/> <IfModule mod_authz_core.c> # Apache 2.4 Require all granted # Require local </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from all Allow from 127.0.0.1 Allow from ::1 </IfModule></Directory># Those directories should not be viewed by Web clients.<Directory /usr/share/roundcubemail/bin/> Order Allow,Deny Deny from all</Directory><Directory /usr/share/roundcubemail/plugins/enigma/home/> Order Allow,Deny Deny from all</Directory>[root@www ~]# systemctl restart httpd[root@www ~]# setsebool -P httpd_can_network_connect on[10]
Access to [https://(your server's hostname or IP address/)/webmail/], then Roundcube login form is shown, authenticate with any user on Mail Server.
Skin LOGO change:
/usr/share/roundcubemail/skins/elastic/imagesWebmail Logo: logo.svg TAb Logo: favicon.ico Upload file size in webmail:
# vi /etc/php.ini
memory_limit = 128Mmax_execution_time = 120memory_limit = 512M; post_max_size = 80M;upload_max_filesize = 50M; date.timezone = Asia/Dhakasystemctl restart httpdsystemctl restart php-fpmLL