空客户端邮箱服务器配置

在这里插入图片描述

desktop0主机配置

  • 步骤一:安装postfix
[root@desktop0 yum.repos.d]# yum -y install postfix
已加载插件:langpacks
软件包 2:postfix-2.10.1-6.el7.x86_64 已安装并且是最新版本
无须任何处理

  • 步骤二:修改配置文件
[root@desktop0 postfix]# vim /etc/postfix/main.cf 
  • 99行域后缀补全
    在这里插入图片描述
  • 116行允许所有邮箱
    在这里插入图片描述
  • 164行服务器
    在这里插入图片描述
  • 步骤三:重启服务
[root@desktop0 postfix]# systemctl restart postfix
[root@desktop0 postfix]# systemctl enable postfix

server0主机操作(做为空邮箱服务器)

  • 步骤一:安装postfix
[root@server0 yum.repos.d]# yum -y install postfix
已加载插件:langpacks
软件包 2:postfix-2.10.1-6.el7.x86_64 已安装并且是最新版本
无须任何处理

  • 步骤二:修改配置文件
[root@server0 postfix]# vim /etc/postfix/main.cf 
  • 99行域后缀补全
    在这里插入图片描述
  • 116行只允许本机
    在这里插入图片描述
  • 164行值为空,不允许其它服务器接收邮箱
    在这里插入图片描述
  • 317允许接收邮箱的IP
  • 可以先通过命令解析IP
[root@desktop0 postfix]# nslookup smtp0.example.com
Server:		172.25.254.254
Address:	172.25.254.254#53

smtp0.example.com	canonical name = desktop0.example.com.
Name:	desktop0.example.com
Address: 172.25.0.10

在这里插入图片描述

  • 测试
[root@server0 ~]# echo 123 | mail -s haha -r  student student
[root@server0 ~]# mail -u student                                  #server0接收不到邮箱
No mail for student
 
[root@desktop0 postfix]# mail -u student                         #desktop0接收到邮箱
Heirloom Mail version 12.5 7/5/10.  Type ? for help.
"/var/mail/student": 2 messages 2 new
>N  1 student@desktop0.exa  Sun Feb 17 20:19  18/604   "haha"

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值