+2010-09-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * nnimap.el (nnimap-stream): Mention starttls.
+ (nnimap-open-connection): Add starttls support.
+
2010-09-23 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (nnir-run-imap): Fix up nnir to work with the new nnimap.
(defvoo nnimap-stream 'ssl
"How nnimap will talk to the IMAP server.
-Values are `ssl', `network' or `shell'.")
+Values are `ssl', `network', `starttls' or `shell'.")
(defvoo nnimap-shell-program (if (boundp 'imap-shell-program)
(if (listp imap-shell-program)
"*nnimap*" (current-buffer) nnimap-address
(or nnimap-server-port "imap"))
'("imap"))
+ ((eq nnimap-stream 'starttls)
+ (starttls-open-stream
+ "*nnimap*" (current-buffer) nnimap-address
+ (or nnimap-server-port "imap"))
+ '("imap"))
((eq nnimap-stream 'ssl)
(open-tls-stream
"*nnimap*" (current-buffer) nnimap-address
'(open run)))
(gnus-set-process-query-on-exit-flag (nnimap-process nnimap-object) nil)
(when (setq connection-result (nnimap-wait-for-connection))
+ (when (eq nnimap-stream 'starttls)
+ (nnimap-send-command "STARTTLS")
+ (starttls-negotiate (nnimap-process nnimap-object)))
(unless (equal connection-result "PREAUTH")
(if (not (setq credentials
(if (eq nnimap-authenticator 'anonymous)