首先,先將sendmail元件移除(或是停止服務[root@host ~]# /etc/rc.d/init.d/sendmail stop)
[root@host ~]# rpm -e sendmail 或是[root@host ~]# yum remove sendmail

再來使用查詢套件的指令檢查是否有安裝下列套件
cyrus-sasl cyrus-sasl-plain, cyrus-sasl-md5, syrus-sasl-gssapi, procmai
(預設安裝應該都會安裝上去)

再來使用yum安裝下列套件
[root@host ~]# yum install imap, imap-devel, postfix

將/etc/postfix/main.cf.default這個檔案複製一份為/etc/postfix/main.cf
[root@host ~]# cp /etc/postfix/main.cf.default /etc/postfix/main.cf

找到以下字串並進行適當修改
# 設定本機的 host name
myhostname = idw.myvnc.com
# 設定 domain 網域
mydomain = myvnc.com
# 設定幫忙 relay 的 hosts
mynetworks = 192.168.0.0/24, 127.0.0.0/8
# 設定本機要接收的 mail, 同 sendmail 的 local-host-names
mydestination = myvnc.com

接著啟動postfix服務,並於開機時啟動
[root@host ~]# /etc/rc.d/init.d/postfix start

查看服務是否有正常啟動25 port
[root@host ~]# netstat -tlunp | grep :25
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      5036/master

接下來安裝dovecot
[root@host ~]# yum install dovecot

修改/etc/dovecot.conf設定檔
# 修改 protocos 參數, 提供 pop3和imap
protocols = pop3, imap

接下來啟動dovecot服務
[root@host ~]# /etc/rc.d/init.d/dovecot start

查看是否有正常啟動110 port
[root@host ~]# netstat -tlunp | grep :110
tcp        0      0 :::110                      :::*                        LISTEN      4971/dovecot

這樣就大功告成囉
arrow
arrow
    全站熱搜

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