Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I hope "resumable" is the correct term.

I just installed mutt on my laptop. AFAIK mutt itself cannot download mails to the local filesystem, so you'll need something like fetchmail. I installed it, and here's my ~/.fetchmailrc

protocol IMAP                      
user 'xxxxx@xxxxxx.xxxxx.xxxxx'        
there with password 'xxxxxxxxxx'        
mda "/usr/bin/procmail -d %T"        
sslcertpath /home/anta40/.certs/

As you can see, my email is a Google Apps mail. I ran fetchmail -v. It worked: fetchmail downloaded my mails, starting from my very first mail. Now the problem is: fetchmail takes a long time to download all of my mails. I ran it at this 3 AM, and now at 6.20 AM, it's still running. This is the current output:

fetchmail: IMAP< A8479 OK Success
 not flushed
fetchmail: IMAP> A8480 STORE 12783 +FLAGS (\Seen)
fetchmail: IMAP< * 12783 FETCH (FLAGS (\Seen))
fetchmail: IMAP< A8480 OK Success
fetchmail: IMAP> A8481 FETCH 12784 RFC822.HEADER
fetchmail: IMAP< * 12784 FETCH (RFC822.HEADER {1570}
reading message of 40346 (1570 header octets) #
fetchmail: IMAP< )
fetchmail: IMAP< A8481 OK Success
fetchmail: IMAP> A8482 FETCH 12784 BODY.PEEK[TEXT]
fetchmail: IMAP< * 12784 FETCH (BODY[TEXT] {4370}
 (4370 body octets) **********************************.******************************.**********************.*************************.*********
fetchmail: IMAP< )
fetchmail: IMAP< A8482 OK Success
 not flushed
fetchmail: IMAP> A8483 STORE 12784 +FLAGS (\Seen)
fetchmail: IMAP< * 12784 FETCH (FLAGS (\Seen))
fetchmail: IMAP< A8483 OK Success
fetchmail: IMAP> A8484 FETCH 12785 RFC822.HEADER
fetchmail: IMAP< * 12785 FETCH (RFC822.HEADER {2137}
reading message of 40346 (2137 header octets) #
fetchmail: IMAP< )
fetchmail: IMAP< A8484 OK Success
fetchmail: IMAP> A8485 FETCH 12785 BODY.PEEK[TEXT]
fetchmail: IMAP< * 12785 FETCH (BODY[TEXT] {10257}
 (10257 body octets) ***************************.********************************.*********************************.************************************.*******************************.*******************************************.****************************.*****************************************.**************************************.*****************************.*
fetchmail: IMAP< )
fetchmail: IMAP< A8485 OK Success
 not flushed
fetchmail: IMAP> A8486 STORE 12785 +FLAGS (\Seen)
fetchmail: IMAP< * 12785 FETCH (FLAGS (\Seen))
fetchmail: IMAP< A8486 OK Success

12785 mails of 40346 mails downloaded. Hopefully my laptop will not get overheat. Well If I stop this operation, is it possible for fetchmail to resume the download, so it will not download starting from zero again?

share|improve this question

It seems to me that using --fetchall and --keep means you can't resume an interrupted fetch without re-fetching all previously fetch mail.

Retrieve both old (seen) and new messages from the mailserver. The default is to fetch only messages the server has not marked seen.

Keep retrieved messages on the remote mailserver. Normally, messages are deleted from the folder on the mailserver after they have been retrieved.

You might be interested in offline Gmail (review)


Part of the difficulty is that, as I'm sure you know, IMAP is designed so that all the mail is kept in one place and you access that service online from a variety of clients - all presenting the same view. A POP service expects you to download all your mail to a single local client (and delete it from the POP server). What you are trying to do is neither one nor the other. Fetchmail attempts to deal with this by only downloading messages marked as unread. If you mark some messages as read by accessing the IMAP server with a client, the server won't present those messages to fetchmail when it asks for unread messages. You want a local mirror of your IMAP mailbox regardless of message status. I don't know how to use fetchmail to achieve that.

share|improve this answer
Hmm... I removed fetchall and keep from .fetchmailrc, and when I ran fetchmail -v on mutt, there were no new mails in the inbox. I guess that was because I already read all the mails, via iPad. But when I ran Thunderbird, I could see those mails in the inbox. So can we assume that the iPad didn't mark the already read mails? – anta40 Dec 31 '11 at 20:49
@anta40: See updated Answer. – RedGrittyBrick Jan 1 '12 at 11:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .