Cofigureshell
General - Mail
Mail server = smtp-relay.gmail.com
Mail sender = [G-Suite 郵箱]測試
Advanced Settings
mail.smtp.username = [G-Suite 郵箱]ui
登陸ESXi的SSH,進入shellrest
執行命令:#vi /etc/mail/submit.cfserver
找到如下行,加入it
# "Smart" relay host (may be null)
DS smtp-relay.gmail.comtest
保存該文件後,email
執行命令:#systemctl restart sendmail登錄
測試郵件發送可使用如下命令:echo "Subject: sendmail test" | sendmail -f "[G-Suite 郵箱]" -v "[收件郵箱]"dva
以上設置完成後,雖然Monitor - Tasks & Events - Event裏仍是會有 cannot send email to ... 的錯誤,可是事實上能夠收到警告郵件。