Redhat

如何將 sendmail 配置為通過具有 TLS 的 Office 365 (SMTP) 中繼電子郵件

  • February 20, 2019

我有一個執行 RHEL 6.3 的盒子,並且有一個應用程序需要通過郵件發送報告,為了使此功能正常工作,我必須在我的盒子中配置郵件。此外,我認為在我的正常電子郵件中接收我的根警報而不是登錄到盒子會很好。

我創建了一個 Office 365 帳戶,其唯一目的是用作中繼。

Office 365 SMTP 詳細資訊:

SMTP:pod51011.outlook.com 埠:587 加密:TLS

我嘗試了什麼:

- Defined the SMART_HOST in the sendmail.mc
- Generated and configured sendmail certificates
- Created the AuthInfo file with SMTP credentials
- Eliminated from sendmail.mc localhost's loopback
- Got frustrated because even thought I configured everything (using different guides) sendmail kept trying to send them throught localhost.

經過 8 小時的多次嘗試後:

- Gave up on sendmail and slept 12 hours due to a massive headache.
- Decided to use SSMTP (because sendmail was a PITA) and people said SSMTP was easy to configure.
- Configured SSMTP and for some reason SASLAUTH said it couldn't connect to the SMTP.
- Got frustrated again and uninstalled SSMTP.

我在這裡尋求幫助,因為我想擊敗 sendmail!誰能指出我正確的方向?

我也嘗試使用通過 gmail 中繼的 sendmail 來執行此操作,但選擇使用 postfix 代替,因為它似乎更易於設置。您不必經歷創建自簽名證書等的過程。此操作指南適用於 gmail,但 Office 365 的過程應該非常相似。只需找出伺服器名稱和身份驗證方案即可。 http://rs20.mine.nu/w/2011/07/gmail-as-relay-host-in-postfix/ Geo

更改sendmail.mc後,您是否/etc/mail/make為了建構而執行sendmail.cfservice sendmail restart生成新的後你也跑了sendmail.cf嗎?

引用自:https://serverfault.com/questions/464048