1.向bin发一份邮件
2.切换用户,查看邮件
[root@mail ~]# su - bin
This account is currently not available.
您在 /var/spool/mail/root 中有新邮件
[root@mail ~]# mailx
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/root": 2 messages 2 new
>N 1 lanzeou Fri Dec 23 14:37 98/3014 "test"
N 2 lanzeou Fri Dec 23 14:48 96/3053 "bin用户"
& 2
Message 2:
From lanzeou@dsrw.com Fri Dec 23 14:48:28 2022
Return-Path: <lanzeou@dsrw.com>
X-Original-To: bin@dsrw.com
Delivered-To: bin@dsrw.com
From: "lanzeou" <lanzeou@dsrw.com>
To: <bin@dsrw.com>
Subject: bin用户
Date: Fri, 23 Dec 2022 14:48:27 +0800
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_000E_01D916DD.9D9E6FD0"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AdkWmoOg7xps3deCSue4D8D2OcGPFA==
Content-Language: zh-cn
Status: R
Content-Type: text/plain;
charset="gb2312"
Bin用户测试
& quit
3.查看aliases邮件别名服务的配置文件
[root@mail ~]# cat /etc/aliases
#
# Aliases in this file will NOT be expanded in the header from
# Mail, but WILL be visible over networks or from /bin/mail.
#
# >>>>>>>>>> The program "newaliases" must be run after
# >> NOTE >> this file is updated for any changes to
# >>>>>>>>>> show through to sendmail.
#
# Basic system aliases -- these MUST be present.
mailer-daemon: postmaster
postmaster: root
# General redirections for pseudo accounts.
bin: root
daemon: root
adm: root
lp: root
sync: root
shutdown: root
halt: root
mail: root
news: root
uucp: root
operator: root
games: root
gopher: root
ftp: root
4.再liases邮件别名服务的配置文件新建别名,并立即生效
[root@mail ~]# vim /etc/aliases
Dsrwcom: root
bin: root
daemon: root
adm: root
[root@mail ~]# newaliases
5.使用dsrwcom发送邮件
6.查看邮件
[root@mail ~]# mailx
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/root": 3 messages 1 new 2 unread
U 1 lanzeou Fri Dec 23 14:37 99/3024 "test"
2 lanzeou Fri Dec 23 14:48 97/3064 "bin用户"
>N 3 lanzeou Fri Dec 23 14:58 95/2981 "dsrwcom测试"
& 3
Message 3:
From lanzeou@dsrw.com Fri Dec 23 14:58:39 2022
Return-Path: <lanzeou@dsrw.com>
X-Original-To: dsrwcom@dsrw.com
Delivered-To: dsrwcom@dsrw.com
From: "lanzeou" <lanzeou@dsrw.com>
To: <dsrwcom@dsrw.com>
Subject: dsrwcom测试
Date: Fri, 23 Dec 2022 14:58:37 +0800
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_001B_01D916DF.09CE8DB0"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AdkWm+JNiMg5iDFLTgCklbZ7ozFbww==
Content-Language: zh-cn
Status: R
Content-Type: text/plain;
charset="gb2312"
Dsrwcom2022.12.23
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容