[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exchange status errors
At Wed, 17 Nov 2010 07:06:11 +0100,
David Maus wrote:
>
> [1 <text/plain; US-ASCII (7bit)>]
> At Tue, 16 Nov 2010 20:35:35 -0600,
> Eric Larson wrote:
> >
> > I've tried debugging this more and I'm pretty sure I'm hitting:
> >
> > * IMAP STATUS command MUST NOT be used as a "check for new messages in the
> > selected mailbox" operation (RFC3501)
> >
> > In reading the code it seems like the "right" way to fix it would be
> > to do and async check per folder, but that hasn't been done.
>
> I don't think that the problem is caused by this bug in WL: The
> Exchange server sends us an OK with the requested mailbox information
> and for some reason WL fails when parsing the response. You could try
> this (e.g. it's not the STATUS bug) out by checking out WL branch
> 'elmo-imap4-compliance' where the STATUS command bug has been fixed.
>
I actuall did check it out and give it a try. In fact, I'm pretty sure
that is what I'm using now :)
Unfortunately I still see the problem. Just to verify, the way I've
tested is:
1. make && make install
2. restart emacs
3. start up wl
Would I potentially be using cached .elc files?
I've never done anything to complicated with emacs lisp, so any
resource to help me debug are appreciated as well.
> > I think it is b/c the status returned uses all lowercase words. I'm
> > not entirely sure that is the case, but that my current hypothesis. In
> > any case, looking at the debug output, it seems like there is a subtle
> > difference b/w gmail and exchange that lets gmail work and exchange
> > fails.
>
> The relevant code in elmo-imap4.el:
>
> (setq status
> (cons
> (let ((token (read (current-buffer))))
> (case (intern (upcase (symbol-name token)))
> (MESSAGES
> (list 'messages (read (current-buffer))))
> (RECENT
> (list 'recent (read (current-buffer))))
> (UIDNEXT
> (list 'uidnext (read (current-buffer))))
> (UIDVALIDITY
> (and (looking-at " \\([0-9]+\\)")
> (prog1 (list 'uidvalidity (match-string 1))
> (goto-char (match-end 1)))))
> (UNSEEN
> (list 'unseen (read (current-buffer))))
> (t
> (message
> "Unknown status data %s in mailbox %s ignored"
> token mailbox))))
> status))
>
> So the lowercase answer should not be the problem because the tokes
> are uppercased. The error message you get indicate that grabbing the
> tokens works.
>
This is where I've been looking and trying to add log messages. I also
tired moving the upcase to different parts of the function. My
debugging is pretty random as I don't really know lisp very well.
> You could try to overload the function `elmo-imap4-parse-status' with
> a variant below and see what the conversion of the response token to a
> symbol gets us.
>
> (defun elmo-imap4-parse-status ()
> (let ((mailbox (elmo-imap4-parse-mailbox))
> status)
> (when (and mailbox (search-forward "(" nil t))
> (while (not (eq (char-after (point)) ?\)))
> (setq status
> (cons
> (let ((token (read (current-buffer))))
> (case (intern (upcase (symbol-name token)))
> (MESSAGES
> (list 'messages (read (current-buffer))))
> (RECENT
> (list 'recent (read (current-buffer))))
> (UIDNEXT
> (list 'uidnext (read (current-buffer))))
> (UIDVALIDITY
> (and (looking-at " \\([0-9]+\\)")
> (prog1 (list 'uidvalidity (match-string 1))
> (goto-char (match-end 1)))))
> (UNSEEN
> (list 'unseen (read (current-buffer))))
> (t
> (message
> "Unknown status data %s in mailbox %s ignored"
> (intern (upcase (symbol-name token))) mailbox))))
> status))
> (skip-chars-forward " ")))
> (and elmo-imap4-status-callback
> (funcall elmo-imap4-status-callback
> status
> elmo-imap4-status-callback-data))
> (list 'status status)))
>
I'll give that a try. Thanks for all the help!
Eric
> Best,
> -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de
> [2 <application/pgp-signature (7bit)>]
>