If the Sony hack has taught us anything, it's that keeping incriminating emails in your inbox is a terrible idea. Even if you aren't doing anything particularly bad, if someone gets into you email, everything you've ever said could be out in the open. Here's how to make sure that doesn't happen by automatically backing up and deleting everything in your Gmail account on a schedule.
How to Automatically Clear Out 30 Day Old Messages
If you want to clear out your Gmail every so often, you'll need a Google Script. We're going to use this one from Digital Inspiration. You can do this with a lot of email clients, but we're going to focus on Gmail. If you'd prefer, here are guides for Outlook and Thunderbird. Google Apps owners can also justchange the retention period for emails. That said, here's how to set it up on regular old freebie Gmail account:
Now, your Gmail account will clear out any message older than 30 days. If your Gmail account is filled to the brim with email, you might want to go through and delete everything manually at first. It's worth noting that this moves your messages to Gmail's trash, which takes 30 more days to completely delete. If you're worried about that, set a reminder to pop into your trash and manually delete everything.
How to Back Up and Encrypt Your Gmail Account on a Schedule
Deleting your email is pretty easy, but once it's gone, you can't search through old emails anymore. That sucks. So, you might consider making an encrypted, local backup of your email. This way, you can search through it when you need to, but your emails won't be stored on anyone's servers, ripe for hackers.
You have a lot of options for this (including some if you're not using Gmail), but we're going to use the open source software GMVault to download a backup of the Gmail account.
How Can I Save All My Emails for a Personal Backup?
Dear Lifehacker, I'm leaving my job and want to take my work emails with me. I've been…Read more
That's your first backup and it'll probably take a while before it's finished up. Restoring your email depends on how you want to view them. GMVault has a guide for various restore options depending on when you want. Once the GMVault backup is done, you'll want to set up a system to back up your email once a week. How you do this depends on whether you're on Windows or OS X.
If you're not using Gmail, you can create a backup of your email using just about any desktop email client. Here are guides for some of the more popular apps:
When you finish backing up your email, you can then go ahead and encrypt those files locally if you want.
A Beginner's Guide to Encryption: What It Is and How to Set it Up
You've probably heard the word “encryption” a million times before, but if you still …Read more
# Gmvault: Backup and restore your gmail account
Gmvault is a tool for backing up your gmail account and never lose email correspondence.
Gmvault is open source and under GNU-AGPL-3.0.
For further info go [gmvault.org] (http://gmvault.org)
# Contribute
- Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There will be a Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.
- Fork the reporsitory on Github to start making your changes to the **master** branch (or branch off of it).
- Write a test which shows that the bug was fixed or that the feature works as expected.
- Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHOR.
# Quick Start
## Installation
You can download one of the “binary” distribution from (github.com/download) for the platform of your choice.
You can also install the software from the source from (github.com/gaubert/gmvault).
## Windows install
Once installed launch gmvault-shell.bat (there should be a shortcut on your desktop).
The shell sets the environment so you can seamlessly launch gmvault.
Go to the gmvault 2 mins start to learn how to pilot gmvault.
## Linux and Mac OS X install
Untar the binary tarball distribution and go to the GMVAULT_HOME/bin dir to launch gmvault.
## Install from the sources
python setup.py install
## Install from PyPi
pip install gmvault
or
easy_install gmvault
## gmvault 2 mins start
Gmvault is a user-frendly command-line tool. It tries to set all the necessary defaults to be self explanatory.
### Authentication
Gmvault allow users to use a XOAuth token or your gmail login password. The XOAuth authentication is the recommended way to access your account.
This method is activated by default. After the first authentication for a given account, the XOAuth token is stored in $HOME/.gmvault and will be used for subsequent authentications.
The following example uses XOAuth to access foo.bar@gmail.com
$>gmvault sync foo.bar@gmail.com
With the –passwd option, you can use your gmail login and password for a quick test or if you cannot use XOAuth.
You will then enter an interactive session to enter your password. By default your password is not saved, but you can use the option to do it. Your password will be stored encrypted but please avoid using this option if possible.
### Backup your emails
Full sync:
$>gmvault sync foo.bar@gmail.com
Incremental sync:
$>gmvault sync -t quick foo.bar@gmail.com
Emails are backed up in $HOME/gmvault-db (or %HOME%/gmvault-db for Win) by default. Use -d DB_DIR, –db-dir DB_DIR to change the location of your local email repository
### Restore your emails in a Gmail account
$>gmvault restore newfoo.bar@gmail.com
Will restore $HOME/gmvault-db (or %HOME%/gmvault-db for Win) in newfoo.bar@gmail.com
$>gmvault restore newfoo.bar@gmail.com -d /backup/emails-db
Will restore /backup/emails-db in newfoo.bar@gmail.com
Use –resume or –restart to restart from the last fatal error and not reupload once more the already treated emails.
$>gmvault restore newfoo.bar@gmail.com –restart