Install Mailx on RHEL8 & 9

Install Mailx on RHEL8 & 9

Install

yum -y install mailx
1

Configuration

vim /etc/mail.rc
set from=kevin.fan@shacombank.com.hk
set smtp=smtp://10.10.214.238:25
2

e.g.

echo "EmailTest" | mailx -v -s " Repo_Download_Result" kevin.fan@shacombank.com.hk

telnet

3

SEND FILE BY EMAIL

/usr/bin/mailx -s "RHEL8_repo_report_check-date" kevin.fan@shacombank.com.hk < /root/web.repo

Install Mailx on RHEL 9

dnf install s-nail

vim /etc/s-nail.rc
set from=truesight@shacombank.com.hk
set smtp=smtp://10.10.214.238:25

echo "EmailTest" | nail -v -s " Repo_Download_Result" kevin.fan@shacombank.com.hk

posted @ 2025-08-27 12:11  k98091518  阅读(12)  评论(0)    收藏  举报