
我有一個 Debian 11 系統作為本地文件伺服器運行。我想讓它盡可能簡單,但有一些來自 Monit 的基本監控。我已經安裝和配置msmtp
,並且msmtp-mta
我已經確認我可以從命令列發送測試訊息
mail -s "test" [email protected] <<END
This is a test
END
我收到了來自 的電子郵件unattended-upgrades
。
我看過在 Monit 配置文件中輸入 SMTP 詳細信息的指南,但我更願意只將詳細信息存儲在一個位置 ( /etc/msmtprc
),因此在我的 monit 配置文件中,我將set mailserver localhost
. Monit 正在嘗試連接但失敗 -/var/log/monit.log
我看到:
[2023-04-25T16:43:24+0100] error : Cannot connect to [localhost]:25 -- Connection refused
[2023-04-25T16:43:24+0100] error : Cannot open a connection to the mailserver localhost:25 -- Operation now in progress
[2023-04-25T16:43:24+0100] error : Mail: Delivery failed -- no mail server is available
我是不是誤會了什麼?