Linux serverNETWORK ADMINISTRATIONS

All steps to setup webmail server roundcubemail-1.2.3 from CentOS 7 clean OS

I made a new movie to correct some steps, please view the new one. https://youtu.be/UzMgoUp5AZk

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

===
mysql

rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm

yum update -y
(it takes about 5 minutes)

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

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
===

yum install postfix dovecot -y

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
===

nano /etc/dovecot/dovecot.conf

protocols = imap

nano /etc/dovecot/conf.d/10-mail.conf

## the location of the mailbox is specified in ‘mbox’ format ##
mail_location = mbox:~/mail:INBOX=/var/mail/%u

## There is no this step in movie, but please add it to fix privilege issue. ##
## dovecot is granted necessary permission to read/write user mailboxes ##
mail_privileged_group = mail

systemctl enable postfix.service
systemctl start postfix.service

systemctl enable dovecot.service
systemctl start dovecot.service

===
1.2.3

yum install wget -y

cd /tmp && wget https://github.com/roundcube/roundcubemail/releases/download/1.2.3/roundcubemail-1.2.3-complete.tar.gz

tar -xzvf roundcubemail-1.2.3-complete.tar.gz -C /var/www/html
mv /var/www/html/roundcubemail-1.2.3/ /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-mcyrpt php-mysql -y

===

time

nano /etc/php.ini

date.timezone = “Asia/Taipei”

===
reboot (SELINUX will disabled )
init 6

===
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

===

add test user
useradd test123
passwd test123

run this after create EVERY user account (or you will get error when you login webmail)
chmod 600 /var/mail/*

(Please teach me if you have better way to fix this issue.)

===
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.

source

centos 7

Leave a Reply

Your email address will not be published. Required fields are marked *