From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59826 Path: main.gmane.org!not-for-mail From: Juergen Kreileder Newsgroups: gmane.emacs.gnus.general Subject: Three problems with multiple IMAP accounts Date: Thu, 17 Feb 2005 04:42:35 +0100 Organization: Blackdown Java-Linux Team Message-ID: <87wtt76edw.fsf@blackdown.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1108612534 27442 80.91.229.2 (17 Feb 2005 03:55:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 17 Feb 2005 03:55:34 +0000 (UTC) Original-X-From: ding-owner+M8367@lists.math.uh.edu Thu Feb 17 04:55:33 2005 Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by ciao.gmane.org with esmtp (Exim 4.43) id 1D1ck3-0006Q3-EI for ding-account@gmane.org; Thu, 17 Feb 2005 04:54:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1D1cia-00034g-00; Wed, 16 Feb 2005 21:52:44 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1D1cYs-00034E-00 for ding@lists.math.uh.edu; Wed, 16 Feb 2005 21:42:42 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1D1cYn-00050S-B8 for ding@lists.math.uh.edu; Wed, 16 Feb 2005 21:42:37 -0600 Original-Received: from news by quimby.gnus.org with local (Exim 3.35 #1 (Debian)) id 1D1cYm-0004fC-00 for ; Thu, 17 Feb 2005 04:42:36 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 155 Original-NNTP-Posting-Host: p508ed2a7.dip0.t-ipconnect.de Original-X-Trace: quimby.gnus.org 1108611756 17929 80.142.210.167 (17 Feb 2005 03:42:36 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Thu, 17 Feb 2005 03:42:36 +0000 (UTC) X-PGP-Key: http://blackhole.pca.dfn.de:11371/pks/lookup?op=get&search=0x730A28A5 X-PGP-Fingerprint: 7C19 D069 9ED5 DC2E 1B10 9859 C027 8D5B 730A 28A5 Mail-Copies-To: nobody X-Bender: Oh, no room for Bender, huh? Fine. I'll go build my own lunar lander. With blackjack. And hookers. In fact, forget the lunar lander and the blackjack! Ah, screw the whole thing. User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:4MCsU89wiXlFvmW7NaTJ0d7Hpb0= X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu X-MailScanner-From: ding-owner+m8367@lists.math.uh.edu X-MailScanner-To: ding-account@gmane.org Xref: main.gmane.org gmane.emacs.gnus.general:59826 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59826 Hi, I have a few problems with multiple IMAP accounts: Problem 1: Excessive reconnecting ========== If I do 'g' with just one IMAP account I see: ,---- | Reading active file from Local via nnimap... | nnimap: Checking mailboxes...done `---- With two IMAP accounts this changes to: ,---- | Reading active file from Remote via nnimap... | Opening nnimap server on Remote... | Opening nnimap server on Remote...done | nnimap: Checking mailboxes...done | Reading active file from Local via nnimap... | Opening nnimap server on Local... | Opening nnimap server on Local...done | nnimap: Checking mailboxes...done `---- Note the "Opening nnimap ..." lines, they don't show up in the one-account case. Now if I enter and immediately leave a group on one of the accounts (in this case the "Local" account) and do 'g' again, I get: ,---- | Reading active file from Remote via nnimap... | Opening nnimap server on Remote... | Opening nnimap server on Remote...done | nnimap: Checking mailboxes...done | Reading active file from Local via nnimap... | Opening nnimap server on Local... | imap: Connecting to server.jknet... | imap: Opening SSL connection with `openssl s_client -cert /home/gnustest/.SSL/mailclient.cert -key /home/gnustest/.SSL/mailclient.key -quiet -ssl3 -connect %s:%p'...done | Waiting for response from server.jknet...done | imap: Authenticating using CRAM-MD5...done | Opening nnimap server on Local...done | nnimap: Checking mailboxes...done `---- Ie. it closed the perfectly good connection and immediately opened a new one! This close&reconnect thing happens each time I leave a group and do 'g'. I can work around this reconnecting issue by setting nnimap-dont-close to nil. But I suspect the real problem is somewhere else, why does it take the "Opening nnimap..." path with more than one account? Problem 2: Agent confusion ========== Sometimes the agent confuses the two IMAP accounts. The consequence is that new mail doesn't show up anymore, or it shows up on the wrong account. Entering a group also shows the contents from the group with the same name on the other account. To get things working again, I have to delete ~/News/agent/. Problem 3: Unprefixed names in nnimap-mailbox-info ========= nnimap-mailbox-info contains un-prefixed group names. This slows down 'g' in the group buffer when there are groups with the same name on both IMAP accounts. This patch fixes the problem for me: --- /usr/share/emacs/site-lisp/gnus/lisp/nnimap.el 2005-02-16 12:30:12.000000000 +0100 +++ ./nnimap.el 2005-02-16 14:21:18.000000000 +0100 @@ -989,8 +989,11 @@ function is generally only called when G (defun nnimap-update-unseen (group &optional server) "Update the unseen count in `nnimap-mailbox-info'." (gnus-sethash - (gnus-group-prefixed-name group server) - (let ((old (gnus-gethash-safe (gnus-group-prefixed-name group server) + (gnus-group-prefixed-name group (gnus-server-to-method + (format "nnimap:%s" server))) + (let ((old (gnus-gethash-safe (gnus-group-prefixed-name + group (gnus-server-to-method + (format "nnimap:%s" server))) nnimap-mailbox-info))) (list (nth 0 old) (nth 1 old) (imap-mailbox-status group 'unseen nnimap-server-buffer) @@ -1098,7 +1101,9 @@ function is generally only called when G (dolist (group groups) (gnus-message 9 "nnimap: Quickly checking mailbox %s" group) (add-to-list (if (gnus-gethash-safe - (gnus-group-prefixed-name group server) + (gnus-group-prefixed-name + group (gnus-server-to-method + (format "nnimap:%s" server))) nnimap-mailbox-info) 'asyncgroups 'slowgroups) @@ -1111,20 +1116,26 @@ function is generally only called when G new old) (when (imap-ok-p (imap-wait-for-tag tag nnimap-server-buffer)) (if (or (not (string= - (nth 0 (gnus-gethash (gnus-group-prefixed-name - group server) - nnimap-mailbox-info)) + (nth 0 (gnus-gethash + (gnus-group-prefixed-name + group (gnus-server-to-method + (format "nnimap:%s" server))) + nnimap-mailbox-info)) (imap-mailbox-get 'uidvalidity group nnimap-server-buffer))) (not (string= - (nth 1 (gnus-gethash (gnus-group-prefixed-name - group server) - nnimap-mailbox-info)) + (nth 1 (gnus-gethash + (gnus-group-prefixed-name + group (gnus-server-to-method + (format "nnimap:%s" server))) + nnimap-mailbox-info)) (imap-mailbox-get 'uidnext group nnimap-server-buffer)))) (push (list group) slowgroups) (insert (nth 3 (gnus-gethash (gnus-group-prefixed-name - group server) + group (gnus-server-to-method + (format "nnimap:%s" + server))) nnimap-mailbox-info)))))))) (dolist (group slowgroups) (if nnimap-retrieve-groups-asynchronous @@ -1144,7 +1155,8 @@ function is generally only called when G (insert str) (when nnimap-retrieve-groups-asynchronous (gnus-sethash - (gnus-group-prefixed-name group server) + (gnus-group-prefixed-name + group (gnus-server-to-method (format "nnimap:%s" server))) (list (or (imap-mailbox-get 'uidvalidity group nnimap-server-buffer) (imap-mailbox-status = Juergen -- Juergen Kreileder, Blackdown Java-Linux Team http://www.blackdown.org/java-linux/java2-status/