[mew-int 2818] gmail stmp stunnel wrong version number

Kendall Shaw <[email protected]>
Newsgroups gmane.mail.mew.general
Message-ID <[email protected]>
Hi,

I'm trying to send email through gmail's smtp server, but I get an
error, which I'll describe below.

My configuration looks like:

(add-to-list 'load-path "/opt/mew-6.3/share/emacs/site-lisp/mew")

(autoload 'mew "mew" nil t)
(autoload 'mew-send "mew" nil t)

(if (boundp 'read-mail-command)
    (setq read-mail-command 'mew))

(autoload 'mew-user-agent-compose "mew" nil t)
(if (boundp 'mail-user-agent)
    (setq mail-user-agent 'mail-user-agent))
(if (fboundp 'define-mail-user-agent)
    (define-mail-user-agent
      'mew-user-agent
      'mew-user-agent-compose
      'mew-draft-send-message
      'mew-draft-kill
      'mew-send-hook))

(setq mew-mail-domain "example.com")

(setq mew-proto "%")

(setq mew-imap-auth nil)
(setq mew-imap-delete nil)

(setq user-mail-address "[email protected]")
(setq mew-smtp-user "[email protected]")
;(setq mew-mail-domain "example.com")
(setq mew-smtp-server "smtp.gmail.com")
(setq mew-smtp-ssl t)
(setq mew-smtp-ssl-port "587")
(setq mew-tls-smtp "smtp")
;(setq mew-smtp-auth-list '("PLAIN" "LOGIN" "CRAM-MD5"))
(setq mew-prog-ssl "/home/someone/bin/test-stunnel")
; I also tried verify level 0
(setq mew-ssl-verify-level 1)
(setq mew-ssl-cert-directory "/etc/ssl/certs")

(setq mew-use-cached-password t)

where test-stunnel uses either stunnel3 or stunnel4, e.g.:

echo "$@" > /tmp/stunnel-args.txt
/usr/bin/stunnel4 "$@"


With stunnel3 I get:

...
2010.02.08 14:58:51 LOG7[29935:3086478224]: SSL alert (write): fatal:
handshake failure
2010.02.08 14:58:51 LOG3[29935:3086478224]: SSL_connect: 1408F10B:
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
2010.02.08 14:58:51 LOG5[29935:3086478224]: Connection reset: 0 bytes
sent to SSL, 0 bytes sent to socket
2010.02.08 14:58:51 LOG7[29935:3086478224]: stunnel3 finished (0 left)

The args are:

-c -f -a /etc/ssl/certs -d 127.0.0.1:10305 -v 1 -D debug -P  -r
 smtp.gmail.com:587

I changed the source to supply an empty argument for -P. Otherwise, I
get:

Pid file (none) must be full path name


If I use stunnel4, I get the same:

2010.02.08 15:12:23 LOG7[32293:3086719888]: SSL alert (write): fatal:
handshake failure
2010.02.08 15:12:23 LOG3[32293:3086719888]: SSL_connect: 1408F10B:
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
2010.02.08 15:12:23 LOG5[32293:3086719888]: Connection reset: 0 bytes
sent to SSL, 0 bytes sent to socket
2010.02.08 15:12:23 LOG7[32293:3086719888]: 10383 finished (0 left)

It creates a config file like:

client=yes
pid=
verify=1
foreground=yes
debug=debug
CApath=/etc/ssl/certs
[10383]
accept=127.0.0.1:10383
connect=smtp.gmail.com:587

I'm running ubuntu 9.04. Do you know what the problem might be?

Thank you,

Kendall
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.