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

Checking for new mail in IMAP folders



[The following applies to Mutt 1.5.6i; CVS head from 2004-09-04.]

I have tried to find a way to check for new mail in IMAP folders
without having to enter one of the folders.  My current solution
is this macro:

  macro browser $ \
    "<search>INBOX.Sent\n<select-entry><change-folder>?<toggle-mailboxes>"

When I press $ in the browser, Mutt enters the IMAP folder
INBOX.Sent, causing Mutt to check for new mail in all the other
IMAP folders as well as INBOX.Sent, and then change back to the
folder view, allowing me to choose any folder that has new mail.

This works will enough, now that I'm using INBOX.Sent as a dummy
folder, since nothing is ever put in there.  (My previous solution
was just to pick the last IMAP folder on the screen, but I soon
noticed that this made Mutt zero out the New Messages count for
that folder every time I pressed $.

But even though this current approach works, I can't help but
feel that there's a more elegant solution that doesn't require me
to have a dummy folder in the folder list.  I know it's possible
to make Mutt check for mail on every startup, and use periodic
checking, but I don't want that -- I want to be able to check
my IMAP folders when I feel like it by pressing a key, like my
solution above.

So, does anyone know of a more elegant solution to the problem?
Patching mutt to make the IMAP mail check function available
to key bindings should be trivial, so I'll look into that if no
better solution is possible.

-- 
 Haakon