info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Windows XP emacs hangs on imap connection to gmail


From: George Oliver
Subject: Windows XP emacs hangs on imap connection to gmail
Date: Tue, 1 Feb 2011 22:38:43 -0800 (PST)
User-agent: G2/1.0

hi,

I've seen a few similar reports of this going back the last year or
two but haven't found a working solution in those threads. I'm trying
to access gmail, and gnus hangs after the message "Opening TLS
connection to `imap.gmail.com'...done".

Using no gnus .11 and emacs 23.2.1 on windows XP (I gave a shot a
compiling the current emacs source but compiling is erroring out with
both mingw and msys).

Some more info -- *Messages*, .gnus.el, .authinfo, and output of
gnutls-cli in the shell -- below, any ideas?


thanks, George

--------------
Here is *Messages*:

Opening connection to imap.gmail.com via tls...
Opening TLS connection to `imap.gmail.com'...
Opening TLS connection with `gnutls-cli -p 993
imap.gmail.com'...failed
Opening TLS connection with `gnutls-cli -p 993 imap.gmail.com --
protocols ssl3'...failed
Opening TLS connection with `openssl s_client -connect imap.gmail.com:
993 -no_ssl2 -ign_eof'...done
Opening TLS connection to `imap.gmail.com'...done
Quit trying to open server nnimap+gmail
nnimap (gmail) open error: ''.  Continue? (y or n)
Please answer y or n.  nnimap (gmail) open error: ''.  Continue? (y or
n)
Couldn't open server on gmail
Warning: Quit trying to open server nnimap+gmail

------------------

Here is .gnus.el

;; You need this to be able to list all labels in gmail

(setq gnus-ignored-newsgroups "")

;; And this to configure gmail imap

(setq gnus-select-method '(nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
(nnimap-stream tls)))

;; My version of gnus in my Mac does not handle html messages
;; correctly (the one in the netbook does, I guess it is a different
;; version). The following will chose plaintext every time this is
;; possible.

(setq mm-discouraged-alternatives '("text/html" "text/richtext"))

;; Available SMTP accounts. The format is
;; type of connection - account in the from field - smtp server -
;; port - login name - password. You can leave the password field
;; as NIL and emacs will ask every time

(defvar smtp-accounts
'(
(ssl "<my-username>" "smtp.gmail.com"
587 "<my-username>" "<my-password>")))

;; Now lets configure smtpmail.el with your name and functions to send
;; mail using your smtp accounts by changing the from field

(require 'smtpmail)
(setq send-mail-function 'smtpmail-send-it
message-send-mail-function 'smtpmail-send-it
mail-from-style nil user-full-name "George Oliver"
smtpmail-debug-info t smtpmail-debug-verb t)

(defun set-smtp (mech server port user password)
"Set related SMTP variables for supplied parameters."
(setq smtpmail-smtp-server server smtpmail-smtp-service port
smtpmail-auth-credentials (list (list server port user
password)) smtpmail-auth-supported (list mech)
smtpmail-starttls-credentials nil)
(message "Setting SMTP server to `%s:%s' for user `%s'."
server port user))

(defun set-smtp-ssl (server port user password &optional key
            cert)
"Set related SMTP and SSL variables for supplied parameters."
(setq starttls-use-gnutls t
starttls-gnutls-program "gnutls-cli"
starttls-extra-arguments nil smtpmail-smtp-server server
smtpmail-smtp-service port
smtpmail-auth-credentials (list (list server port user
password)) smtpmail-starttls-credentials (list (list
server port key cert)))
(message
"Setting SMTP server to `%s:%s' for user `%s'. (SSL
enabled.)" server port user))



(defun change-smtp ()
"Change the SMTP server according to the current from line."
(save-excursion
(loop with from = (save-restriction
        (message-narrow-to-headers)
        (message-fetch-field "from"))
for (auth-mech address . auth-spec) in smtp-accounts
when (string-match address from) do (cond
((memq auth-mech '(cram-md5 plain login))
(return (apply 'set-smtp (cons auth-mech auth-spec))))
((eql auth-mech 'ssl)
(return (apply 'set-smtp-ssl auth-spec)))
(t (error "Unrecognized SMTP auth. mechanism:
`%s'." auth-mech))) finally (error "Cannot infer SMTP
information."))))

;; The previous function will complain if you fill the from field with
;; an account not present in smtp-accounts.

(defvar %smtpmail-via-smtp (symbol-function 'smtpmail-via-smtp))

(defun smtpmail-via-smtp (recipient smtpmail-text-buffer)
(with-current-buffer smtpmail-text-buffer
(change-smtp))
(funcall (symbol-value '%smtpmail-via-smtp) recipient
smtpmail-text-buffer))

;; This wraps send mail via smtp mail, to be able to send multiple
;; messages with smtpmail.

-------------

Here is .authinfo format

machine imap.gmail.com login  <my-username> password <my-password>
port 993


-------------

Output of gnutls-cli in a shell



C:\Documents and Settings\george\My Documents>gnutls-cli -p 993
imap.gmail.com
Resolving 'imap.gmail.com'...
Connecting to '74.125.155.109:993'...
- Certificate type: X.509
 - Got a certificate list of 2 certificates.
 - Certificate[0] info:
  - subject `C=US,ST=California,L=Mountain View,O=Google
Inc,CN=imap.gmail.com', issuer `C=US,O=Google Inc,CN=Google Internet
Authority', RSA key 1024 bits, signed using RSA-SHA1, activated
`2010-04-22 20:22:19 UTC', expires `2011-04-22 20:32:19 UTC', SHA-1
fingerprint `d5120bf1c88f4b105d18ae0c909a4c2d88c7d002'
 - Certificate[1] info:
  - subject `C=US,O=Google Inc,CN=Google Internet Authority', issuer
`C=US,O=Equifax,OU=Equifax Secure Certificate Authority', RSA key 1024
bits, signed using RSA-SHA1, activated `2009-06-08 20:43:27 UTC',
expires `2013-06-07 19:43:27 UTC', SHA-1 fingerprint
`dd7a7f131ddba33d3e8670179483e6fea6987d6a'
- The hostname in the certificate matches 'imap.gmail.com'.
- Peer's certificate issuer is unknown
- Peer's certificate is NOT trusted
- Version: TLS1.0
- Key Exchange: RSA
- Cipher: ARCFOUR-128
- MAC: MD5
- Compression: NULL
- Handshake was completed

- Simple Client Mode:

* OK Gimap ready for requests from 24.17.224.196 14if696290ibn.38








reply via email to

[Prev in Thread] Current Thread [Next in Thread]