這是本文件的舊版!
工具預設使用的發信軟體
/etc/mail/mailer.conf
發信
echo "This is a test mail." | mail -s "test mail" [email protected]
停用 sendmail
sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO"
ssmtp
安裝
pkg install ssmtp cd /usr/ports/mail/ssmtp make replace 或手動編輯 /etc/mail/mailer.conf 將預設的 sendmail 改成/usr/local/sbin/ssmtp
設定 /usr/local/etc/ssmtp/ssmtp.conf
[email protected] AuthPass=password FromLineOverride=YES mailhub=smtp.gmail.com:587 UseSTARTTLS=YES