All steps to setup webmail server roundcubemail-1.3.5 from CentOS 7 clean OS with DDNS domain name
You can get steps in this address.
https://docs.google.com/document/d/1NDH-J67O4_kYNsaIPWgeAyqFCgPfI89Mr4JuyVGTk20/edit?usp=sharing
CentOS-7-x86_64-DVD-1708.iso
roundcubemail-1.3.5
From CentOS 7 clean minimum installation
with
mysql apache php postfix dovecot roundcubemail
===
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
yum update -y
yum install mysql-community-server -y
systemctl enable mysqld.service
systemctl start mysqld.service
cat /var/log/mysqld.log |grep “temporary password”
[Please use your own password here. ]
xxxxxxxxx
A!GdloexE41G
mysql_secure_installation
(all answer Yes)
set a powerful password
qWeeS34VfGbb-_-dEc-_-abab
mysql -u root -p
(qWeeS34VfGbb-_-dEc-_-abab)
create database data;
CREATE USER ‘ggyy’@’localhost’ IDENTIFIED BY ‘AsWe34_-tYu-_pxXccD’;
GRANT ALL PRIVILEGES ON *.* TO ‘ggyy’@’localhost’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
===
yum install httpd -y
systemctl enable httpd.service
systemctl start httpd.service
systemctl disable firewalld
systemctl stop firewalld
===
yum install nano -y
nano /etc/sysconfig/selinux
SELINUX=disabled
===
nano /etc/postfix/main.cf
myhostname = jimmypan.dlinkddns.com
mydomain = jimmypan.dlinkddns.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $mydomain, $myhostname, localhost.$mydomain, localhost
mail_spool_directory = /var/mail
===
yum install dovecot -y
nano /etc/dovecot/dovecot.conf
protocols = imap
nano /etc/dovecot/conf.d/10-mail.conf
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_privileged_group = mail
mail_access_groups = mail
systemctl enable postfix.service
systemctl start postfix.service
systemctl enable dovecot.service
systemctl start dovecot.service
===
roundcubemail-1.3.5
yum install wget -y
cd /tmp && wget https://github.com/roundcube/roundcubemail/releases/download/1.3.5/roundcubemail-1.3.5-complete.tar.gz
tar -xzvf roundcubemail-1.3.5-complete.tar.gz -C /var/www/html
mv /var/www/html/roundcubemail-1.3.5/ /var/www/html/webmail
chown -R apache:apache /var/www/html/webmail/*
chown -R apache:apache /var/www/html/webmail/
(option : check apache user : egrep ‘^User|^Group’ /etc/httpd/conf/httpd.conf )
===
install php
yum install php php-dom php-pdo php-mbstring php-mysql php-intl -y
===
time
nano /etc/php.ini
date.timezone = “Asia/Taipei”
===
init 6
(or Roundcube mail configuration file cannot save directly)
(SELINUX=disabled will take effect here)
===
http://jimmypan.dlinkddns.com/webmail/installer
===
change default e-mail domain in roundcube
nano /var/www/html/webmail/config/config.inc.php
$config[‘mail_domain’] = ‘%n’;
use %d if you got one extra default e-mail hostname
systemctl restart httpd.service
===
add test user
useradd test1
passwd test1
===
http://jimmypan.dlinkddns.com/webmail
===
# remove installer folder
rm -rf /var/www/html/webmail/installer
===
I am not a Linux expert (only a beginner). Please correct me if my command or anything is wrong. Thank you.
centos 7