how to limit fetching number of mails?

Kevin J. McCarthy kevin at 8t8.us
Fri Jul 10 14:32:13 UTC 2020


On Fri, Jul 10, 2020 at 03:21:42AM +0000, Ishihama Yutaro wrote:
>I would like to know how to limit fetching number of mails because it 
>is impossible to complete fetching within the set period of time (imap 
>keep alive 300 seconds).

The server timeout should generally be 30 minutes.

However, if you have a **very** large number of mails, the server can 
time out while fulfilling a single FETCH request.  To fix this, you can 
fetch them in groups.  Do this by putting:

   set imap_fetch_chunk_size = 10000

in your .muttrc.  This will perform a FETCH per 10000 messages, which 
should avoid server timeouts.  You can try reducing the number if that 
is still too big.

>What does this MUA copy to the local environment in the IMAP mode? Is 
>this only subject? It would be of great help if someone could advice 
>me.

The headers Mutt requests by default are listed at 
<http://www.mutt.org/doc/manual/#imap-headers>.

By the way, if you have a large number of messages, you will want to use 
header caching.  See <http://www.mutt.org/doc/manual/#caching>.

   % mkdir ~/.mutt/hcache
   set header_cache = ~/.mutt/hcache

You may also want to try out $imap_qresync or $imap_deflate.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20200710/7061a146/attachment.asc>


More information about the Mutt-users mailing list