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

Re: bug in IMAP edit-threads



On Tuesday, March 21 at 10:58 AM, quoth Aron Griffis:
Actually, further investigation has revealed what's actually
happening, with both mutt-1.5.11 and mutt-cvs:

1. With mutt -F /dev/null, after linking and syncing, the message
  disappears temporarily.  It reappears (in the correctly linked
  location) the next time that messages are fetched from the server,
  for example when imap-fetch-mail is called.

2. With header_cache enabled, after linking and syncing, the messages
  disappears semi-permanently.  In truth the message is still on the
  server, but no amount of imap-fetch-mail causes it to reappear in
  the index.  Exiting mutt (possibly just changing folders) causes
  the message to reappear.

Ahh, this very definitely sounds like an incompatibility (or at least, disagreement on the specs) between mutt and your imap server.

So, the way mutt “edits” messages is that it downloads it, deletes the old one, and uploads the changed copy. That’s the way it *has* to do it, because the IMAP protocol doesn’t make allowances for in-place message edits.

Mutt, then, relies on the server to report this new message, presumably because it needs the unique MSGID number for it that must be generated by the server (this is again, an artifact of the IMAP protocol that allows messages to be referred to and cached on a semi-permanent basis). When you tell mutt to do an “imap-fetch-mail”, what mutt *actually* does is sends a NOOP command to the server. Most servers take that opportunity to reply with notification of all the new messages in the mailbox since the last time the client sent a NOOP. Apparently, your server does not do this (I haven’t checked the specs to find out who is right on this detail). In order to get mutt to do a full SELECT and re-fetch all message IDs, currently, you have to go through the change-folder mechanism (though you don’t have to go to another folder and come back, you can just change-folder to the current folder).

If I remember correctly, mutt supports the ^ character to refer to “this folder”, so you could make a macro (I haven’t tested this) like as follows to do a more thorough (and rather inefficient) imap-fetch-mail:

macro index i "<change-folder>^<enter>" "thorough imap-check-mail"

~Kyle
--
In all matters of opinion, our adversaries are insane.
                                                         -- Oscar Wilde

Attachment: pgpvevhvPFaSP.pgp
Description: PGP signature