Using mutt with Gmail I “check for e-mail updates” sometimes through the $ binding (sync-mailbox), sometimes just by using c (change folder) and just supplying = (defaults to MAILBOX) as the IMAP folder path to change to.
Is there a better (in particular: faster) way of doing the same? A solution would be something that is more direct than “pretending to switch folders”, as I do, for example. Also something that does not “miss” some updates, as $ seems to do at times (perhaps $ is not meant to check for e-mails at all but just to expunge messages marked as deleted, etc?)
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Bind a key (G for “Get” is recommended) to imap-fetch-mail in your ~/.muttrc.
bind index G imap-fetch-mail
Pressing G while in the index will now fetch new mail from the imap server.
(for POP users, the fetch-mail function fetches mail from a POP server)
Method 2
You can set the timeout variable to something like:
set timeout=10
This will poll the current mailbox every 10 seconds at most when mutt is idle waiting for user input, more often than the default 600 seconds.
This is not needed in post v1.5.11 when IDLE is enabled.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0