pop3 over ssl
-- by Goldencat <ruili@worldnet.att.net>
今天來說說pop3s吧.
pop3s的意思就是pop3 over ssl的意思.簡單的說,也就是你
收信的時侯,可以幫你加密一下.可以讓你放心很多.因為這個
很簡單,所以就簡簡單單的說說好了.
測試環境: RedHat 7.0 (CLE1.0)
Windows 98 (outlook)
存在問題: outlook 0x800b0109 (後面會說道)
首先需要su到root去.然後:
vi /etc/xinted.d/pop3s
確定下面的disable是no (或者enable = yes)
# default: off
# description: The POP3S service allows remote users to access their mail \
# using an POP3 client with SSL support such as fetchmail.
service pop3s
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/ipop3d
log_on_success += USERID
log_on_failure += USERID
}
然後我們還需要一個certificate.當然也很簡單啦.
cd /usr/share/ssl/certs
然後:
make ipop3d.pem
umask 77 ; \
PEM1=`/bin/mktemp /tmp/openssl.XXXXXX` ; \
PEM2=`/bin/mktemp /tmp/openssl.XXXXXX` ; \
/usr/bin/openssl req -newkey rsa:1024 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2 ; \
cat $PEM1 > ipop3d.pem ; \
echo "" >> ipop3d.pem ; \
cat $PEM2 >> ipop3d.pem ; \
rm -f $PEM1 $PEM2
Using configuration from /usr/share/ssl/openssl.cnf
Generating a 1024 bit RSA private key
..............++++++
..................................................++++++
writing new private key to '/tmp/openssl.fKQfTX'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US -->這裡是輸入國家代號.
State or Province Name (full name) [Some-State]:New Jersey -->這裡輸入你所在的洲
Locality Name (eg, city) []:New Providence -->所在的城市
Organization Name (eg, company) [Internet Widgits Pty Ltd]: Goldencat's Corp. -->公司名稱
Organizational Unit Name (eg, section) []:Mail -->部門名稱
Common Name (eg, your name or your server's hostname) []:goldencat.com -->你的名子或者hostname
Email Address []:goldencat@goldencat.com -->你的e-mail
這樣就可以了.在上面的那一大堆需要填寫東西的地方,如果你不願意填寫,或者不知道填什麼.
那麼直接打 . 就好了.(空白的意思)例如:
Organizational Unit Name (eg, section) []: .
只有一個 . 就可以了.
接下來就是重新啟動xinted了.
/etc/rc.d/init.d/xinetd restart
OutLook. 在outlook中,設定很簡單.只要在:
工具->帳戶->郵件->屬性->高級 下面的pop3
中的那個
此服務器要求安全連結(ssl)前面打勾就可以了.
fetchmail也可以fetch ssl的. 只要 -ssl 就可以了.
但是有個不解的問題(麻煩那位如果有辦法,跟大家分享一下)
就是在win98中,如果你更新到IE6的話.那麼那個outlook express
會給你0x800b0109的error.並且說:您連接到的服務器正在使用一
個無法驗證的安全證書. 然後文你是否繼續.選擇是就會繼續收信
了.(收信沒有問題,這個message也只是在每次開啟outlook的時侯
才出現,開啟一後,只要不關閉outlook,再收信就沒有這個error了)
這個問題在win2000中就正常.聽說IE5也都正常.目前我知道的唯一
的解決辦法就是花錢去網上買一個certificate就可以解決了.當然,
對我來說,我只要pop3 over ssl就好了.不會為了多一個message而
去買個certificate回來.(況且linux上得東西都fix的很快,也許過
幾天就有解決方法了)
0x800b0109的意思就是:CERT_E_UNTRUSTEDROOT
|