centos7.6 搭建邮件服务器
设置主机名
hostnamectl set-hostname --static tt.jhq.com
1.卸载linux sendmail
rpm -qa|grep sendmail
rpm -e sendmail*
2.安装postfix和d0vecot 发送和收取邮件
yum install -y postfix devecot
postfix 发送邮件 25端口
dovecot 收邮件 110端口
3.配置postfix
vi /etc/postfix/main.cf
#取消注释,设置hostname
myhostname = mail.domain.com
#取消注释,设置域名
mydomain = doamin.com
#99行: 取消注释
myorigin = $mydomain
#116行: 默认是localhost,我们需要修改成all
inet_interfaces = all
#119行: 推荐ipv4,如果支持ipv6,则可以为all
inet_protocols = ipv4
#164行: 添加
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#取消注释,指定内网和本地的IP地址范围
mynetworks = 127.0.0.0/8 #也可以使用0.0.0.0/0使用所有ip及端口号
#取消注释,邮件保存目录
home_mailbox = Maildir/
#添加
smtpd_banner = $myhostname ESMTP
#添加到最后&n

本文详细介绍如何在CentOS7.6中搭建邮件服务器,包括卸载sendmail、安装Postfix与Dovecot、配置邮件发送与接收等功能,并提供设置样例。
最低0.47元/天 解锁文章
3676

被折叠的 条评论
为什么被折叠?



