安裝postfix
$sudo apt-get install postfix

接下來會有兩個設定
1.選擇[Internet Site] 
2.輸入@後面的顯示方式[abc.com.tw]

 

如果您下次要重新設定剛剛哪兩張圖片的內容或更多postfix的設定
$sudo dpkg-reconfigure postfix
一、點選[OK]
mail01.JPG

二、選擇[Internet Site]

mail02.JPG

三、輸入[你的網域名稱]

mail03.JPG

四、輸入管理帳號

mail04.JPG

五、預設

mail05.JPG

六、預設

mail06.JPG

七、預設

mail07.JPG

八、預設

mail08.JPG

九、預設(mailbox的大小,0表示無限制)

mail09.JPG

十、預設

mail10.JPG

十一、預設

mail11.JPG

十二、系統重新啟動postfix,完成設定

mail12.JPG

 

安裝POP3與IMAP套件才能收信(你也可以只安裝一種),預設Server版當初有選安裝mail服務的話,這兩個都會幫你裝到好。
$ sudo apt-get install dovecot-pop3d
$ sudo apt-get install dovecot-imapd

$ sudo vi /etc/dovecot/dovecot.conf
#使用兩種方式可以收信
protocols = imap imaps pop3 pop3s
#支援的格式
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_privileged_group = mail


測試POP3與IMAP是否可行
pop3出現以下文字代表正常
$ telnet localhost pop3
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.

imap出現以下文字代表正常
$ telnet localhost imap
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN] Dovecot ready.


請用Outlook設定就可以收信囉

版主發現每次登入都會有一封信件,內容如下:
This text is part of the internal format of your mail folder, and is not
a real message. It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.

編輯$sudo chmod 777 /var/spool/mail/john
之後,就不會出現此一問題囉

 

 

arrow
arrow
    全站熱搜

    蒼穹 發表在 痞客邦 留言(0) 人氣()