這是本文件的舊版!


mail工具預設使用的發信軟體

/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