配置不同的两个域的邮件服务器收发邮件
# 和之前配置haha.com域一样的方法配置xixi.com域的邮件服务器,使用两台虚拟机来完成
[root@xixi ~]# useradd dadou
[root@xixi ~]# useradd xiaodou
[root@xixi ~]# useradd doudou
[root@xixi ~]# echo redhat | passwd --stdin dadou
Changing password for user dadou.
passwd: all authentication tokens updated successfully.
[root@xixi ~]# echo redhat | passwd --stdin doudou
Changing password for user doudou.
passwd: all authentication tokens updated successfully.
[root@xixi ~]# echo redhat | passwd --stdin xiaodou
Changing password for user xiaodou.
passwd: all authentication tokens updated successfully.
# 测试邮件收发状态
[root@xixi ~]# mail xiaodou@xixi.com
Subject: test01
这是测试内容
EOT
[root@xixi ~]# su - xiaodou
[xiaodou@xixi ~]$ mail
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/xiaodou": 1 message 1 new
>N 1 root Mon Oct 25 18:26 18/553 "test01"
>& 1
>Message 1:
>From root@xixi.com Mon Oct 25 18:26:34 2021
Return-Path: <root@xixi.com>
X-Original-To: xiaodou@xixi.com
Delivered-To: xiaodou@xixi.com
Date: Mon, 25 Oct 2021 18:26:34 +0800
To: xiaodou@xixi.com
Subject: test01
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=utf-8
From: root <root@xixi.com>
Status: R
这是测试内容
&
exit
# 在命令行发本域的邮件没有问题,接下来测试使用客户端来收发本域邮件
客户端测试没有问题,接下来测试跨域之间的邮件收发。
Oct 25 18:35:10 kittod postfix/smtp[8597]: C038CCBBC1: to=<xiaodou@xixi.com>, relay=none,
delay=0.08, delays=0.06/0.02/0/0, dsn=4.4.3, status=deferred (Host or domain name not found.
Name service error for name=xixi.com type=MX: Host not found, try again)
# 收发失败,根据日志内容显示,是主机错误,这是因为主机名解析的问题
# 通过配置DNS服务器中的邮件服务器记录来解决这个问题