因為某些奇怪的原因.所以沒帶 sendmail 這東西.
再者不想加入這麼大型的玩意到目前的機械上.
所以直接裝上 Exim4 為機械發送郵件.
而別的東西還是留在 Mailgun 上.
筆記一下 (機械為 Debian 7 i386)
先確認移除 sendmail (如本身沒有可不用)
1 2 3
| invoke-rc.d sendmail stop apt-get -q -y remove --purge "sendmail*" apt-get clean
|
裝上 Exim4 (同時設為可以對外)
1 2 3 4 5 6 7
| which mail apt-get -q -y install "exim4" apt-get clean ls /etc/exim4/update-exim4.conf.conf sed -i "s/dc_eximconfig_configtype='local'/dc_eximconfig_configtype='internet'/" /etc/exim4/update-exim4.conf.conf cat /etc/exim4/update-exim4.conf.conf | grep dc_eximconfig_configtype invoke-rc.d exim4 restart
|
如果發送郵件後發現沒收到郵件.可以查看 log
1
| tail -n 10 /var/log/exim4/mainlog
|