[root@centos8 8]# cd ./base-c446c86678567d00/packages/
[root@centos8 packages]# pwd
/var/cache/yum/x86_64/8/base-c446c86678567d00/packages
[root@centos8 packages]#
[root@centos8 packages]# du -sh *.rpm
260K mailx-12.5-29.el8.x86_64.rpm
修改mailx的配置文件:(使用126邮箱的25端口)
cat >/etc/mail.rc<< eof
set from=j13680432782@126.com
set smtp=smtp.126.com
set smtp-auth-user=j13680432782
set smtp-auth-password=密码
set smtp-auth=login
eof
笺注:126邮箱为发送邮箱,并且要开启IMAP/SMTP服务、POP3/SMTP服务