(原創)關於國內收國外Email的解決方法
- 詳細內容
- 分類: Mail
- 發佈: 2006-06-04, 週日 22:21
- 作者 Super User
- 點擊數: 19877
注意:所有CLIENT都需要改,因為其中一個不改會影響其他CLIENT。想馬上正常收Email,可重啟ADSL MODEM。
解決方法一,不需要改client,只需改server.(IPTABLE需要開61093 及 110 port)
1.把QMAIL POP3 的 110 PORT 改為 61093
vi /var/qmail/supervise/qmail-pop3d/run
exec tcpserver -H -R -v -c100 0 110 qmail-popup mail.example.com \
/home/vpopmail/bin/vchkpw qmail-pop3d Maildir 2>&1
change to:
exec tcpserver -H -R -v -c100 0 61093 qmail-popup mail.example.com \
/home/vpopmail/bin/vchkpw qmail-pop3d Maildir 2>&1
重啟QMAIL
2.在IPTABLE 把110 port redirect to 61093
vi /etc/rc.d/rc.local
iptables -t nat -A PREROUTING -p tcp --dport 110 -i eth0 -j REDIRECT --to 61093
解決方法二,不需要改server QMAIL setting,只需改 client(IPTABLE需要開110 及 61093 port)
1.在IPTABLE 把61093 port redirect to 110(相當於改port)
vi /etc/rc.d/rc.local
iptables -t nat -A PREROUTING -p tcp --dport 61093 -i eth0 -j REDIRECT --to 110
2.在client(OUTLOOK EXPRESS)中把110 port 改為 61093
解決方法三,server及client都需要改(IPTABLE需要開995 port)
1.在SERVER QMAIL中增加SSL 的POP3
cp -rp /var/log/qmail/qmail-pop3d /var/log/qmail/qmail-pop3ds
cp -rp /var/qmail/supervise/qmail-pop3d /var/qmail/supervise/qmail-pop3ds
/usr/local/share/mkpop3dcert(需要安裝courier-imap)
cp -rp /usr/local/share/pop3d.pem /var/qmail/supervise/qmail-pop3ds/pop3ds.pem
vi /var/qmail/supervise/qmail-pop3ds/log/run
exec setuidgid qmaill multilog t s100000 n20 /var/log/qmail/qmail-pop3d 2>&1
change to
exec setuidgid qmaill multilog t s100000 n20 /var/log/qmail/qmail-pop3ds 2>&1
vi /var/qmail/supervise/qmail-pop3ds/run
exec tcpserver -H -R -v -c100 0 110 qmail-popup mail.example.com \
/home/vpopmail/bin/vchkpw qmail-pop3d Maildir 2>&1
change to:
exec tcpserver -H -R -v -c100 0 995 /usr/sbin/stunnel /var/qmail/supervise/qmail-pop3ds/pop3ds.conf
vi /var/qmail/supervise/qmail-pop3ds/pop3ds.conf
cert = /var/qmail/supervise/qmail-pop3ds/pop3ds.pem
foreground = yes
output = /var/log/qmail/qmail-pop3ds/pop3ds.log
debug = 5
client = no
exec = /var/qmail/bin/qmail-popup
execargs = /var/qmail/bin/qmail-popup mail.jason-tang.com /home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 2>&1
ln -s /var/qmail/supervise/qmail-pop3ds /service
svc-stop /service/qmail-pop3ds
rm -rf /var/log/qmail/q*s/*.s
svc-start /service/qmail-pop3ds
2.在client(OUTLOOK EXPRESS)中選中“這個伺服器需要安全連線-SSL(C)”[110 port自動轉為 995]