Live data from Hacker News

IMAP Email Backup

smalldata.tech

51–60 of 82 posts

Re: IMAP Email Backup

#51
post #13

Thunderbird is your desktop client that can archive, compress, and store all emails offline. I've even used Thunderbird for migrating all my email history, folders etc. between servers: simply add new account and drag and drop folders between accounts. Simple enough to be used by non technical people who do not want to: >./imapgrab.py -d -v -f ~/user@email.com -s imap.mail.server -S -p 993 -u user@email.com -p passwo…

Be careful using Thunderbird to move mail between IMAP4 servers, on Linux at least - I've had it lose messages on me, deleting them from the source before they're successfully written to the destination. I was moving mail from a Gmail account to a Gandi account about a year ago, before the recent spurt of development activity on Thunderbird.

The only time I've ever lost mail was while trying to move a bunch of messages in Postbox (shares Thunderbird's backend). Wasn't even moving between servers-- this was just a folder-to-folder move.

Always copy, verify that the messages really are at the destination, then delete. I don't know why this isn't what Thunderbird does on its own when you move mail, but it isn't.

Re: IMAP Email Backup

#52
post #13

Thunderbird is your desktop client that can archive, compress, and store all emails offline. I've even used Thunderbird for migrating all my email history, folders etc. between servers: simply add new account and drag and drop folders between accounts. Simple enough to be used by non technical people who do not want to: >./imapgrab.py -d -v -f ~/user@email.com -s imap.mail.server -S -p 993 -u user@email.com -p passwo…

I always had horrible experience with thunderbird and any amount > 500 emails.

Thunderbird would start do it's things (moving emails for example) then freeze for a while and then all of a sudden stop in the middle of the operation complaining that it's a lot of work and asking me if I want to continue.

It's enraging every time. More so if you consider that IMAP is not transactional afaik.

Re: IMAP Email Backup

#53
Shout out to office365 for being a piece of crap when it comes to IMAP.

If you launch something like fetchmail or imapsync at it, it will close the connection in the middle of the sync because you're doing something nasty in his opinion.

Last time I switched jobs and had to download 18+ GB of emails it took me days to download them all off office 365, and I was to run it in a while true loop in screen. Luckily I didn't wait for the last day to start downloading my emails.

Re: IMAP Email Backup

#54
post #2

In the same vein the push towards not owning your data also comes with issues[0]. I get along well with a tool called offlineimap[1] though it's python2; you can even use it to sync imap backends[2]. I use it simply to populate a Maildir on my machines. Sadly I have not found it to work with office365 (then again, what does other than outlook and thunderbird's proprietary subscription based extension?). [0]: shameles…

Hmm, my school uses office365 for its email, and I've managed to successfully hook it up to offlineimap for my email. I think the only real "special" thing that I had to do was have it use my email address (i.e. user@university.edu) as my username to authenticate with.

The relevant section of my .offlineimaprc (trimmed for brevity, edited for privacy):

  [Repository remote]
  type = IMAP
  remotehost = outlook.office365.com
  remoteuser = "user@university.edu"
  remoteport = 993

Re: IMAP Email Backup

#55
post #53

Shout out to office365 for being a piece of crap when it comes to IMAP. If you launch something like fetchmail or imapsync at it, it will close the connection in the middle of the sync because you're doing something nasty in his opinion. Last time I switched jobs and had to download 18+ GB of emails it took me days to download them all off office 365, and I was to run it in a while true loop in screen. Luckily I didn…

> Luckily I didn't wait for the last day to start downloading my emails.

And also luckily, your company didn't sue you or try to have you arrested for extracting 18+ GB of company property.

Re: IMAP Email Backup

#56
Hello there,

I've maintained https://github.com/rcarmo/imapbackup since 2013 (and used early versions of it for years before that), so feel free to try it out and see if it fits your use case (mine was snapshotting existing IMAP mailboxes into mbox format, which was what we could use for migrating mailboxes across systems then, and also fit my personal use case for backups).

Re: IMAP Email Backup

#57
post #53

Shout out to office365 for being a piece of crap when it comes to IMAP. If you launch something like fetchmail or imapsync at it, it will close the connection in the middle of the sync because you're doing something nasty in his opinion. Last time I switched jobs and had to download 18+ GB of emails it took me days to download them all off office 365, and I was to run it in a while true loop in screen. Luckily I didn…

> Luckily I didn't wait for the last day to start downloading my emails. And also luckily, your company didn't sue you or try to have you arrested for extracting 18+ GB of company property.

That is also 18+ gb of my life.

Re: IMAP Email Backup

#58
I never was able to backup emails from gmail successfully ~ 10GB of mails right now. Everytime it fails somewhere in between because of reasons mentioned by various people elsewhere in this thread.

Every year I try and fail.

This year with the comments herein I again tried and get invalid credentials error with my Gmail.

1) Used mutt/getmail/python script ( password is correct verified it )

2) Even changed password and still same issue

3) I also tried to enable less secure apps to access email option in google settings. But keep getting the Authentication error. Can someone please point me to a good note on how to get Authentication error sorted ( maybe more to take care of ) ( I use ubuntu bionic , python 2.7.17, getmail 5.5 )

Error rahu@rahu:~/0del/_working/_backupEmail$ ./ss.sh IMAP Grab 0.1.4 --- List option selected Connecting to IMAP server via SSL Logging into IMAP server Traceback (most recent call last): File "./imapgrab.py", line 444, in imapgrab() File "./imapgrab.py", line 150, in imapgrab ig_list = IG_list_mailboxes(ig_options) File "./imapgrab.py", line 193, in IG_list_mailboxes ig_imap.login(ig_options.username,ig_options.password) File "/usr/lib/python2.7/imaplib.py", line 523, in login raise self.error(dat[-1]) imaplib.error: [AUTHENTICATIONFAILED] Invalid credentials (Failure)

Re: IMAP Email Backup

#59
post #52
post #13

Thunderbird is your desktop client that can archive, compress, and store all emails offline. I've even used Thunderbird for migrating all my email history, folders etc. between servers: simply add new account and drag and drop folders between accounts. Simple enough to be used by non technical people who do not want to: >./imapgrab.py -d -v -f ~/user@email.com -s imap.mail.server -S -p 993 -u user@email.com -p passwo…

I always had horrible experience with thunderbird and any amount > 500 emails. Thunderbird would start do it's things (moving emails for example) then freeze for a while and then all of a sudden stop in the middle of the operation complaining that it's a lot of work and asking me if I want to continue. It's enraging every time. More so if you consider that IMAP is not transactional afaik.

Unfortunately IMAP is basically entire ephemeral.

The message IDs are mostly permanent, but the rfc says they can change so clients have to test them as per connection.

This means every time you check your mail with an IMAP client it's syncing some of the headers for every message.

Post reply on HN