To configure a mail server we need to install
- Postfix
- Dovecot
- SquirrelMail
First of all disable SELINUX
# vim /etc/selinux/config
# reboot
or
# setenforce 0
# yum install epel-release -y
** # yum install postfix -y**
We need to make change to postfix file:
# vim/etc/postfix/main.cf
# systemctl restart postfix
# systemctl enable postfix
# yum install dovecot
# systemctl start dovecot
# systemctl enable dovecot
# vim /etc/dovecot/dovecot.conf
protocols = imap pop3 lmtp
# vim /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir
# vim /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = yes
auth_mechanisms = plain login
# vim /etc/dovecot/conf.d/10-master.conf
unix_listener auth-userdb {
//mode = 0600
user = postfix ## uncomment line 91 and enter postfix
group = postfix ## uncomment line 92 and enter postfix
# systemctl restart dovecot
# systemctl enable dovecot
# yum install httpd -y
# systemctl start httpd
# systemctl enable --now httpd
# yum install squirrelmail -y
# cd /usr/share/squirrelmail/config/
# ./conf.pl
# vim /etc/httpd/conf/httpd.conf
Alias /webmail /usr/share/squirrelmail
<Directory /usr/share/squirrelmail>
Options Indexes FollowSymLinks
RewriteEngine On
AllowOverride All
DirectoryIndex index.php
Order allow,deny
Allow from all
# systemctl restart httpd
# systemctl restart dovecot
# adduser mailtask
# passwd mailtask
(Ok , now open mariadb.conf and copy-paste commands to your shell)
Ok, we installed and configure mariadb,open browser and type http://yourdomainname/webmail