yum install mailx
: : set [email protected] # set smtp=smtp://smtp.server.tld:port_number set smtp=smtp://mail.ichiayi.com:587 # tell mailx that it needs to authorise set smtp-auth=login # set the user for SMTP # set [email protected] set smtp-auth-user=jonathan # set the password for authorisation set smtp-auth-password=**mypassword** set ssl-verify=ignore set nss-config-dir=/etc/pki/nssdb set smtp-use-starttls=yes
echo "TEST...信件內容" | mail -s "TEST Sub..信件主旨" [email protected]
如果成功測試結果類似以下訊息
[root@pve-rclone ~]# echo "TEST...1" | mail -s "TEST Sub..1" [email protected] [root@pve-rclone ~]# Error in certificate: Peer's certificate issuer is not recognized.
set ssl-verify=ignore
所以信件還是可以寄出