惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Help Net Security
云风的 BLOG
云风的 BLOG
Apple Machine Learning Research
Apple Machine Learning Research
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
博客园 - Franky
B
Blog RSS Feed
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
量子位
V
Visual Studio Blog
Y
Y Combinator Blog
小众软件
小众软件
N
Netflix TechBlog - Medium
博客园 - 三生石上(FineUI控件)
Microsoft Security Blog
Microsoft Security Blog
雷峰网
雷峰网

博客园 - 520_1351

使用Notepad++的快捷键运行Python时-报错-The security information for shortcuts.xml is missing in config.xml Powerautomate-控制Edge-浏览器-报错-Failed to assume control of Microsoft Edge (communication with Power Automate web extension failed) 关于-密码学算法中-类似-编程函数pow(3, 13, 7)的计算-快速幂算法结合模运算(Exponentiation by Squaring with Modular Reduction) 关于AWS-EC2-串口登录的-IAM权限-Policy-策略 关于 AWS Lambda 中的默认的时区-日期-时间-注意点 关于使用 javascript 脚本语言中的 location.reload() 刷新当前页面 关于Bash - Shell脚本中的索引数组(Indexed Array) 关于Linux系统中-使用passwd对用户密码的锁定与解锁 关于 Redhat - 9 - 补丁升级后-旧版本内核相关的软件包卸载 关于 Amazon Linux 2023 (AL2023) 默认情况下确实没有 /var/log/secure 文件的解决方法 关于-HTML-内容-元素定位- CSS Selector 与 XPath 的说明及区别 关于Microsoft Power Automate-操作-Microsoft Access 数据库-【运行Access查询】 关于 Javascript 中 console.log("xxxx")-及console-对象其他常用的方法 关于Provider=Microsoft.ACE.OLEDB.12.0 与 Provider=Microsoft.ACE.OLEDB.16.0 的区别 通过Powershell-脚本-将指定的日期-转换成年周-格式-周数宽度为2 关于Windows-操作系统中-对带日期-或-数字-的文件目录-按名称排序的规则 关于Microsoft Power Automate-元素的定位-自定义写法去定位时-:nth-child 与 :eq 的区别 关于标准CSS伪类-以及在-Power Automate-等自动化工具中的使用 关于使用-Python-Selenium-模块-加载浏览器的扩展-的方法及注意事项-及只能加载一个扩展的解决方法 关于-根据-ISO8601-国际标准-计算一年中的周数-每年最少52周-每多53周 Redhat-9-中编译-EFS-客户端工具-即过程中-报错提示-warning: aws-lc-fips-sys@0.13.9: Building with: CMake-解决方法 关于Microsoft Power Automate-调用-Outlook-发送邮件-报错- A program is trying to access emal address information stored in Outlook 关于powershell中的-哈希表-Hashtable-类型-说明-类似于python中的字典 关于HTML中<font><b><i><s>等字体标签对-物理字体-逻辑字体的介绍及说明
关于 Redhat - 9 下 postfix 的安装配置 与 mail 命令发送邮件
520_1351 · 2026-03-19 · via 博客园 - 520_1351

操作系统环境:Red Hat Enterprise Linux release 9.7 (Plow)

对于在Linux中发送邮件,一般需要安装 postfix 和 mail 命令 (此前由mailx软件包提供,到了RHEL 9 后由 s-nail 软件包提供)

Postfix 和 s-nail 是 Linux/Unix 邮件系统中两个完全不同角色的组件,它们通常协同工作,但功能定位截然不同。

简单来说:Postfix 负责“发送和路由”邮件(邮局),而 s-nail 负责【撰写】和【阅读】邮件(信箱/信纸)。

两个软件 ,最小化安装的操作系统默认都是没有的、需要使用使用如下的方式安装 

[root@qq5201351 ~]# yum install net-tools telnet -y 
[root@qq5201351 ~]# yum install awscli -y
[root@qq5201351 ~]# yum install postfix -y    # 安装后需要配置
[root@qq5201351 ~]# yum install s-nail        # RHEL 9 需要安装这个

配置postfix, 配置文件 /etc/postfix/main.cf

[root@qq5201351 ~]# grep -E "^inet_protocols|^relayhost" /etc/postfix/main.cf
inet_protocols = ipv4
relayhost = 203.247.274.230:25
[root@qq5201351 ~]#

最后,启动postfix 服务,并加入开机自动启动 

发送邮件的,可以使用如下的命令进行一个简单的测试

echo "this is test" | mail -s "Subject test" xxxx@qq.com

尊重别人的劳动成果 转载请务必注明出处:https://www.cnblogs.com/5201351/p/19740510