nnimap.el: Explicitly ask for server capabilities
authorEric Abrahamsen <eric@ericabrahamsen.net>
Sun, 2 Aug 2015 05:13:43 +0000 (13:13 +0800)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Sun, 2 Aug 2015 05:13:43 +0000 (13:13 +0800)
* lisp/nnimap.el (nnimap-open-connection-1): Don't assume full
  capabilities will be returned in the login-result.

lisp/ChangeLog
lisp/nnimap.el

index 73fba70..e23bed2 100644 (file)
@@ -1,3 +1,8 @@
+2015-08-02  Nikolaus Rath  <Nikolaus@rath.org>
+
+       * nnimap.el (nnimap-open-connection-1): explicitly ask server for
+       capabilities instead of relying on LOGIN response.
+
 2015-07-31  Paul Eggert  <eggert@cs.ucla.edu>
 
        * nnbabyl.el (nnbabyl-retrieve-headers):
index 161a6b4..594d1f5 100644 (file)
@@ -490,7 +490,7 @@ textual parts.")
                        (funcall (nth 2 credentials)))
                      ;; See if CAPABILITY is set as part of login
                      ;; response.
-                     (dolist (response (cddr login-result))
+                     (dolist (response (cddr (nnimap-command "CAPABILITY")))
                        (when (string= "CAPABILITY" (upcase (car response)))
                          (setf (nnimap-capabilities nnimap-object)
                                (mapcar #'upcase (cdr response))))))