From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78059 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.gnus.general Subject: Dovecot and capabilities Date: Mon, 21 Mar 2011 21:15:11 -0400 Message-ID: <87ipvcymzk.fsf@maru.md5i.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1300756546 18280 80.91.229.12 (22 Mar 2011 01:15:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Mar 2011 01:15:46 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M26370@lists.math.uh.edu Tue Mar 22 02:15:42 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1qCD-0001p8-V0 for ding-account@gmane.org; Tue, 22 Mar 2011 02:15:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Q1qBu-0005QR-CW; Mon, 21 Mar 2011 20:15:22 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Q1qBs-0005QD-J8 for ding@lists.math.uh.edu; Mon, 21 Mar 2011 20:15:20 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Q1qBr-0006HE-E0 for ding@lists.math.uh.edu; Mon, 21 Mar 2011 20:15:20 -0500 Original-Received: from md5i.com ([75.151.244.229] helo=maru.md5i.com) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Q1qBq-0001eh-CE for ding@gnus.org; Tue, 22 Mar 2011 02:15:18 +0100 Original-Received: from md5i by maru.md5i.com with local (Exim 4.74) (envelope-from ) id 1Q1qBj-0003BP-D3 for ding@gnus.org; Mon, 21 Mar 2011 21:15:11 -0400 User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78059 Archived-At: --=-=-= Content-Type: text/plain I was trying to figure out why, using my new Dovecot install, I was not getting UIDPLUS or QRESYNC capabilities. I found out that it was because the capabilities were determined at connection time, and the set of advertised capabilities changes between connection and login. Upon login on Dovecot, an updated set of capabilities may be advertised. I was able to account for that using the included patch. A perhaps-better method might be to re-run CAPABILITY after logging in. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0003-Allow-capabilities-to-be-set-after-login.patch >From f6dcf14c70aac1b1c240f0bae4174612b110cf1c Mon Sep 17 00:00:00 2001 From: Michael Welsh Duggan Date: Mon, 21 Mar 2011 21:09:34 -0400 Subject: [PATCH 3/3] Allow capabilities to be set after login --- lisp/nnimap.el | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 138875b..b92c4c8 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -395,7 +395,13 @@ textual parts.") (let ((nnimap-inhibit-logging t)) (setq login-result (nnimap-login (car credentials) (cadr credentials)))) - (unless (car login-result) + (if (car login-result) + ;; See if capability is set as part of login + ;; response + (dolist (response (cddr login-result)) + (when (string= "CAPABILITY" (upcase (car response))) + (setf (nnimap-capabilities nnimap-object) + (mapcar #'upcase (cdr response))))) ;; If the login failed, then forget the credentials ;; that are now possibly cached. (dolist (host (list (nnoo-current-server 'nnimap) -- 1.7.4.1 --=-=-= Content-Type: text/plain -- Michael Welsh Duggan (md5i@md5i.com) --=-=-=--