代码: 全选
Creating an SSL/TLS connection......
stunnel已经装上,配置文件stunnel.conf如下:
代码: 全选
; Sample stunnel configuration file by Michal Trojnara 2002-2010
;
; some options used here may not be adequate for your particular configuration
; please read the manual and make sure you understand them
; certificate/key is needed in server mode and optional in client mode
cert = /etc/stunnel/mail.pem
;key = /etc/stunnel/mail.pem
; protocol version (all, SSLv2, SSLv3, TLSv1)
sslVersion = SSLv3
; security enhancements for UNIX systems - comment them out on Win32
; for chroot a copy of some devices and files is needed within the jail
chroot = /var/run/stunnel
setuid = stunnel
setgid = stunnel
; PID is created inside the chroot jail
pid = /stunnel.pid
; performance tunings
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
;compression = zlib
; workaround for Eudora bug
;options = DONT_INSERT_EMPTY_FRAGMENTS
; authentication stuff needs to be configured to prevent MITM attacks
; it is not enabled by default!
;verify = 2
; don't forget to c_rehash CApath
; CApath is located inside chroot jail
;CApath = /certs
; it's often easier to use CAfile
;CAfile = /etc/stunnel/certs.pem
; don't forget to c_rehash CRLpath
; CRLpath is located inside chroot jail
;CRLpath = /crls
; alternatively CRLfile can be used
;CRLfile = /etc/stunnel/crls.pem
; debugging stuff (may useful for troubleshooting)
debug = 7
output = stunnel.log
;libwrap = no
; SSL client mode
client = yes
; service-level configuration
[GMail_POP]
accept = 127.0.0.1:3001
connect = pop.gmail.com:995
[GMail_SMTP]
accept = 127.0.0.1:3002
connect = smtp.gmail.com:465
[GMail_IMAP]
accept = 127.0.0.1:3003
connect = imap.gmail.com:993
;[https]
;accept = 443
;connect = 80
;TIMEOUTclose = 0
; vim:ft=dosini
.mew.el配置如下:
代码: 全选
(setq mew-use-cached-passwd t)
(setq mew-config-alist
'(("default"
("name" . "xxx")
("user" . "user")
("mail-domain" . "gmail.com")
("imap-ssl" . t)
("imap-ssl-port" . "3003")
("proto" . "%")
("prog-ssl" . "/usr/bin/stunnel")
("imap-auth" . pass)
("imap-user" . "[email protected]")
("imap-server" . "127.0.0.1")
("smtp-ssl" . t)
("smtp-ssl-port" . "3002")
("smtp-user" . "[email protected]")
("smtp-server" . "127.0.0.1")
("smtp-auth-list" . ("PLAIN")))
))
(setq mew-ssl-verify-level 0)
