<<< Date Index >>>     <<< Thread Index >>>

Re: IMAP, mark_old and new mail



On Tuesday, 31 October 2006 at 15:55, Bob Bell wrote:
> On Tue, Oct 31, 2006 at 12:16:02PM -0800, Brendan Cully wrote:
> >On Tuesday, 31 October 2006 at 15:07, Bob Bell wrote:
> >> On Tue, Oct 31, 2006 at 09:08:08AM -0800, Brendan Cully wrote:
> >> Are you expecting to see a "OK [UIDNEXT" reply to a "SELECT"?  There's
> >> code in imap.c that's at least handling it, but my IMAP server isn't
> >> saying it.  Here's a very brief conversation with my IMAP server
> >> (provided to illustrate what Courier says in response to SELECT):
> >
> >Oh. Yes, I am. It's required by RFC 3501 (section 6.3.1). There's
> >probably a way to get mutt to synthesize the value though.
> 
> Now that I know what I'm looking for, I found the following in the
> ChangeLog:
> 
> 2006-03-15 12:26:00  Brendan Cully  <brendan@xxxxxxxxxx>  (brendan)
> 
>        * imap/message.c: Don't store UIDNEXT unless we know it.
> 
>        * imap/message.c: Only synthesize UIDNEXT if we've fetched
>        uncached messages. Fixes a FETCH 1:0 bug Bruno Postle reported and
>        helped to debug.
> 
> 2006-03-13 23:21:51  Brendan Cully  <brendan@xxxxxxxxxx>  (brendan)
> 
>        * imap/message.c: Courier fails to send UIDNEXT on SELECT
>        (a violation of RFC 3501 section 6.3.1) - synthesize it if it
>        is missing.
> 
>        * init.h: Make imap_idle default to false for 1.5.12.
> 
> The two relevant changes can also be seen as git commitdiffs at:
>    http://tinyurl.com/yfp9o6
>    http://tinyurl.com/ya7uo8
> 
> So it seems mutt is already trying to handle this case, though obviously
> failing.  The change seems to be tied into the header cache.  Perhaps
> the current UIDNEXT synthesis is not adequate?

UIDNEXT should be synthesized even if it's not in the header cache, as
the highest UID of any message fetched + 1. You might want to
instrument the code around imap/message.c:322 to see what maxuid is
and whether the imap_mboxcache_get call is finding your mailbox when
you open it...

Attachment: pgppwaquJ3L8T.pgp
Description: PGP signature