How to Backup Emails using IMAP Grab on Linux

0
820

Email is in our everyday life. It’s the ultimate system that changed the way of our communication for good. We now send emails for almost endless reasons. That’s why it’s also necessary to take backups of your email in case you face the need of an old email. Opening the web browser, log into your email account surely takes time. You can use Thunderbird, but the profile is prone to get lost if you need to setup your OS. Learn how to backup Thunderbird profile.

For those on Linux, there’s a really awesome way to back up your complete email without following all those complicated GUI. Trust me, in this scenario, the CLI is hundred times friendlier than the GUI tools.

IMAP Grab

We’ll be using a tool named IMAP Grab. It’s available on any version of Linux distribution, but it doesn’t come up pre-installed. We’ll be downloading it from the GitHub.

  • Prerequisites

We’ll be needing some apps and packages beforehand to run the tool perfectly. At first, check out your installed Python version.

If the result returns Python v2.3.3 or higher, you’re good to go. Otherwise, update your software.

Now, we’ll be needing another dependency called “getmail”. Let’s install it right away!

  • Ubuntu

  • OpenSUSE

  • Fedora

  • Arch Linux

  • Downloading IMAP Grab

This part requires installing Git client on your system. Learn how to install Git on Linux.

Run these commands in the terminal –

  • Using IMAP Grab

Before we start using IMAP Grab for backing up our email, we have to configure the system first. Run this command –

Replace with your own email & password. Change “imap.test.com” with the IMAP server address your email service uses. For example, Gmail uses “imap.gmail.com” Now, the result will show you all the available mailboxes to download.

Now, run these commands for backing up your entire email. Note that we’ll be creating a dedicated folder for the downloading.

Done! Your email is backed up!

If you want to turn the entire backup into one single file, run this command –

If you didn’t know, you can easily encrypt the compressed file. Learn how to encrypt files on Linux.

Spread the love
  • 10
    Shares

PS. If you like this post please share it with your friends on the social networks using the buttons above.Thanks.

LEAVE A REPLY

Please enter your comment!
Please enter your name here