fetchmail-friends
[Top] [All Lists]

[fetchmail] no fetchall with imap

2002-10-09 02:01:57
If "no fetchall" is specified with imap, fetchmail still gets the
sizes of all the mails even though those mails are not going to get
downloaded. This happens even if there is no new mail.

Attached is a patch which gets the sizes of mails from the first
unseen message if "no fetchall" is specified. Also, if there is no new
mail, no sizes are asked for.

Here is a typical transaction after this patch:

...
fetchmail: IMAP> A0004 SEARCH UNSEEN
fetchmail: IMAP< * SEARCH 460
fetchmail: 460 is unseen
fetchmail: IMAP< A0004 OK SEARCH done.
fetchmail: 460 is first unseen
fetchmail: 460 messages (459 seen) for user at server.
fetchmail: IMAP> A0005 FETCH 460 RFC822.SIZE

[ this used to be "FETCH 1:460 RFC822.SIZE" ]

fetchmail: IMAP< * 460 FETCH (RFC822.SIZE 58000)
fetchmail: IMAP< A0005 OK FETCH completed.
fetchmail: skipping message user(_at_)server:1 (0 octets) not flushed

[ the size shown is 0 because the actual size has not been asked for! ]

fetchmail: skipping message user(_at_)server:2 (0 octets) not flushed
...
fetchmail: skipping message user(_at_)server:459 (0 octets) not flushed
fetchmail: IMAP> A0006 FETCH 460 RFC822.HEADER
fetchmail: IMAP< * 460 FETCH (RFC822.HEADER {711}
fetchmail: reading message user(_at_)server:460 of 460 (711 header octets)
...

Sunil Shetye.

Attachment: fetchmail-6.1.0-imapfetchsize.patch
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail] no fetchall with imap, Sunil Shetye <=