一般 ADSL 架站者有時因動態 ip 或是無 MX 紀錄,通常會被拒絕寄信,
此時我們可由 ISP 來代為寄信,Postfix 設定如下:
/etc/postfix/main.cf:
代碼:
relayhost = [smtp.isp.net]
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/isp_sasl_passwd
smtp_sasl_security_options = noanonymous

如果是 hinet 用戶,請將 smtp.isp.net 改為 msa.hinet.net,
而 /etc/postfix/isp_sasl_passwd 內容:
代碼:
msa.hinet.net username:password

然後 postmap hash:/etc/postfix/isp_sasl_passwd
(建立 isp_sasl_passwd.db)

再重新啟動 postfix 即可。