返回顶部

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

posted @   九尾cat  阅读(1021)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示