Vaclav Kosar's face photo

Vaclav Kosar

Vaclav Kosar is a senior software developer. This blog is focused on interesting technology, tips and news.

Easy Online Independence: 1. Mail Backup

05 Jul 2017

This is first post of a series called “Easy Online Independence” aiming to provide cheap and easy way to increase your independence from current online service giants like Google and Facebook. By independence I mean ability to at any time to stand alone or migrate to another service without major losses.

Mail Backup

Do you wonder what would happen if your mail provider decided to discontinue your service and delete all your mails? Paying or not for the service would you really have any way to restore your messages?

Fortunately there is an easy way to prevent these issues and stand more independently. Steps below are focused on Linux, but you should be able to do the same on other platforms.

mbsync (Post Update)

Based on a suggestion from a Redditor, I have migrated to this option and updated this post. These steps are based on Arch Linux Wiki and an older article GMail IMAP Backup With mbsync on Ubuntu.

    IMAPAccount gmail
    User <your username>
    PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/mbsync/gmail.gpg"

    IMAPStore gmail-remote
    Account gmail

    MaildirStore gmail-local
    Path ~/mbsync/gmail/
    Inbox ~/mbsync/gmail/Inbox

    Channel gmail
    Master :gmail-remote:
    Slave :gmail-local:
    # Exclude everything under the internal [Gmail] folder, except the interesting folders
    Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"
    Create Slave
    Sync PullNew
    SyncState *


You can use Thunderbird:

Win Alternative: IMAPSize Backup (Original Post)

This alternative uses a program running also on Windows. It however uses worse format for email “.eml” and doesn’t have other features.

Subscribe: Twitter , Facebook , RSS ,
Share on: Twitter , Facebook , Google+ , LinkedIn , Reddit .

Report any trackers to [email protected].