centos8.1,本地發送郵件


[root@centos8 ~]# mail
bash: mail: command not found...
Failed to search for file: Cannot update read-only repo
[root@centos8 ~]# dnf -y install postfix     安裝軟件

[root@centos8 ~]# systemctl start postfix
[root@centos8 ~]# ss -ntl

[root@centos8 ~]# mail -s test wei
bash: mail: command not found...
Failed to search for file: Cannot update read-only repo
[root@centos8 ~]# dnf -y install mailx      沒發現bash須安裝mailx

[root@centos8 ~]# mail -s test wei       發送郵件給普通用戶
I am root
how are you
EOT
[root@centos8 ~]#

[wei@centos8 ~]$ pwd               查看所在目錄
/home/wei

[wei@centos8 ~]$ mail              查看郵件
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/wei": 1 message 1 new
>N 1 root Sat May 23 09:29 19/571 "test"
& 1
Message 1:
From root@centos8.1.aris Sat May 23 09:29:57 2020
Return-Path: <root@centos8.1.aris>
X-Original-To: wei
Delivered-To: wei@centos8.1.aris
Date: Sat, 23 May 2020 09:29:56 +0800
To: wei@centos8.1.aris
Subject: test
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii
From: root <root@centos8.1.aris>
Status: R

I am root
how are you


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM