#!/bin/bash
# This script configure mail Server on centos 7 
wget ftp://download.anisa.co.ir/Course/LPIC-2/mail.tar
tar -xf mail.tar

cp -f main.cf /etc/postfix/main.cf 
systemctl restart postfix
systemctl enable postfix
yum install -y dovecot
cp -f dovecot.conf /etc/dovecot/dovecot.conf
cp -f 10-auth.conf  /etc/dovecot/conf.d/10-auth.conf
cp -f 10-mail.conf /etc/dovecot/conf.d/10-mail.conf
cp -f 10-master.conf /etc/dovecot/conf.d/10-master.conf
cp -f 10-ssl.conf /etc/dovecot/conf.d/10-ssl.conf
systemctl enable dovecot
systemctl restart dovecot
systemctl stop firewalld
systemctl disable firewalld
