找了一個多小時,以為是 iptable or hosts.allow 的問題…
結果在 localhost 裡,發現 `telnet localhost 25` 跟 `telnet SERVER_NAME 25` 一個可以連一個不行,才想到可能是 sendmail 的問題 -_-"
以下是解法
Check /etc/mail/sendmail.cf and change the line:
Code:
O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
to:
Code:
O DaemonPortOptions=Port=smtp,Addr=0.0.0.0, Name=MTA
and then restart sendmail:
service sendmail restart
or edit sendmail.mc and change the line:
Code:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
to:
Code:
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
recreate sendmail.cf:
Code:
m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
and restart sendmail
Rob