Live data from Hacker News

IMAP Email Backup

smalldata.tech

81–82 of 82 posts

Re: IMAP Email Backup

#81

imapsync is my personal favorite approach to this problem. In addition to imap -> filesystem backups it supports synchronizing mail in both directions. And both source and destination can be remote systems.

The imapsync page https://imapsync.lamiral.info/ states "imapsync is not suitable for maintaining a synchronization between two active imap accounts while the user is working on both sides. Use offlineimap (written by John Goerzen) or mbsync (written by Michael R. Elkins) for bidirectionnal (2 ways) synchronizations."

Re: IMAP Email Backup

#82
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.co…

I think the admin might have enabled some compatibility features for you, I get:

    ~ $ offlineimap
    OfflineIMAP 7.3.2
      Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
    imaplib2 v2.101 (bundled), Python v2.7.18, OpenSSL 1.1.1g  21 Apr 2020
    Account sync work:
     *** Processing account work
     Establishing connection to outlook.office365.com:993 (work-remote)
    Enter password for user '@massive.se':
     PLAIN authentication failed: AUTHENTICATE failed.
     LOGIN authentication failed: LOGIN failed.
     ERROR: All authentication types failed:
     PLAIN: AUTHENTICATE failed.
     LOGIN: LOGIN failed.
     *** Finished account 'work' in 0:11
    ERROR: Exceptions occurred during the run!
    ERROR: All authentication types failed:
     PLAIN: AUTHENTICATE failed.
     LOGIN: LOGIN failed.
    
    Traceback:
      File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 293, in syncrunner
        self.__sync()
      File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 369, in __sync
        remoterepos.getfolders()
      File "/usr/lib/python2.7/site-packages/offlineimap/repository/IMAP.py", line 452, in getfolders
        imapobj = self.imapserver.acquireconnection()
      File "/usr/lib/python2.7/site-packages/offlineimap/imapserver.py", line 586, in acquireconnection
        self.__authn_helper(imapobj)
      File "/usr/lib/python2.7/site-packages/offlineimap/imapserver.py", line 459, in __authn_helper
        "failed:\n\t%s"% msg, OfflineImapError.ERROR.REPO)
Post reply on HN