Centos7基于postfix实现extmail邮件服务器
一.实验环境
软件版本 |
---|
CentOS Linux release 7.3.1611 (Core) |
postfix-3.0.15 |
mysql-community-server-5.7.32 |
dovecot-2.2.36 |
courier-authlib-0.66.2 |
courier-unicode-1.2 |
extmail-1.2 |
extman-1.1 |
httpd-2.4.6 |
以上软件包下载链接:
链接:https://pan.baidu.com/s/1A3ByU3RjrNgYIgkQ31EkqQ
提取码:uah8
postfix官网下载地址:
http://www.postfix.org/download.html
courier-authlib官网下载地址:
http://www.courier-mta.org/download.html#authlib
二.系统初始准备
1.修改主机名
# hostnamectl set-hostname mail.wangdongxu.f3322.net
# hostname mail.wangdongxu.f3322.net
2.配置hosts解析
# vi /etc/hosts
127.0.0.1 mail.wangdongxu.f3322.net wangdongxu.f3322.net localhost localhost.localdomain localhost4 localhost4.localdomain4;
3.关闭selinux
# setenforce 0
# vi /etc/selinux/config
SELINUX=disabled
4.关闭防火墙
# systemctl stop firewalld
# systemctl disable firewalld
5.安装所需包组
# yum groupinstall "Development Tools"
# yum install wget libdb-devel openssl-devel libtool-ltdl-devel expect perl-CGI perl-DB_File perl-ExtUtils-MakeMaker perl-DBI perl-DBD-MySQL perl-Crypt-PasswdMD5 perl-GD cyrus-sasl-devel cyrus-sasl-plain -y
三.配置mysql
# wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
# rpm -ivh mysql57-community-release-el7-8.noarch.rpm
# yum install mysql-server mysql-devel
# vi /etc/my.cnf
//在配置文件末尾增加如下内容:
skip-grant-tables
# systemctl start mysqld
# mysql
mysql> \u mysql
mysql> update user set authentication_string=password("123") where user="root";
mysql> \q
# vi /etc/my.cnf
//在配置文件末尾修改如下:
#skip-grant-tables
validate_password_policy=0
validate_password_length=0
sql-mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
# systemctl restart mysqld
# mysql -uroot -p123
mysql> alter user 'root'@'localhost' identified by 'root123';
mysql>