安裝步驟:
Step1:安裝 exim4 (MTU:純送信元件)
apt-get install exim4-daemon-light mailutils
Step2:設定組態檔
dpkg-reconfigure exim4-config
設定請參考網路上的文章
反正一路安enter,就ok了(除了要輸入smtp server的地方)
======================================================
設定步驟如下:(僅供參考)
使用 smarthost 來傳送郵件;並藉由 SMTP 或是 fetchmail 來接收郵件
mail sent by smarthost; received via SMTP or fetchmail
系統郵件名稱 (mail name):
輸入你的網域名稱(例如:code.onnie.biz)
在有 SMTP 連線傳入時,要進行監聽的 IP 位址 (listen on for incoming SMTP connections):
127.0.0.1(只寄這台主機的email)
要進行接收的其它郵件位址 (Other destinations for which mail is accepted):
保留空白
要替哪些主機進行郵件轉寄 (Machines to relay mail for):
保留空白
外寄郵件時所使用的 smarthost 的 IP 位址或主機名稱 (Machine handling outgoing mail for this host):
你的smtp server ip
是否在外送郵件中隱藏本機的郵件名稱 (hide local mail name in outgoing mail):
否 (No)
是否保持最小的 DNS 查詢量 (don’t keep number of DNS-queries minimal):
否 (No)
本機郵件的傳送方式:
存放在 /var/mail 裡的 mbox 格式
是否將設定檔分散成較小的檔案 (split configuration into small files):
否 (No)
root 及 postmaster 的郵件代收者:
輸入ubuntu系統中指定的使用者帳號(多位使用者的話,以空白字元來分隔)
完成!
===================================================
Step3:測試
echo "Hello ! " | mail -s "Testing Mail" xyz@aaa.bbb.ccc
Step4:查看log
tail -n 20 /var/log/exim4/mainlog
完成~~