You might delete more than you bargained for.
IMAP is one of two protocols used to connect email programs (like Thunderbird or Microsoft Office’s Outlook) to email services (like Gmail and others).
It’s become more popular because many people use multiple devices, and IMAP keeps everything in sync.
The problem? IMAP keeps everything in sync.
Become a Patron of Ask Leo! and go ad-free!
Deleting in IMAP
If your email program is configured to use IMAP to fetch your mail, be aware that if you delete an email in one place, it will be deleted in all places. If you want to delete it from your email account but still keep a copy somewhere, use local folders in your email program. Make sure those are backed up as well.
How IMAP works
IMAP, short for Internet Message Access Protocol, is a protocol (or language) used by email programs to communicate with email servers about a collection of email messages.
Conceptually, it’s simple.
- The email server — say your Gmail account’s server — keeps the official copy of your email.
- Your email program — like Thunderbird or any of dozens of others — make copies of all the email on your local machine.
- You can have multiple email programs on multiple devices all running at the same time. The most common is a desktop email program and an email program on your mobile device.
- Using the IMAP protocol, all these places are kept in sync so they all show the same data.
It’s very handy because it lets you access your email from any device you happen to have handy — the service’s website, your desktop email program, your mobile email, etc.
Everything just works.
We need to look a little more clearly at what it means to keep all those copies in sync.
- If an email arrives at your email server, it automatically shows up in all your email programs and interfaces.
- If you move an email to a folder, anywhere, that email is moved to a folder everywhere else.
- If you delete an email in one place, it’s deleted from all places.
It’s that last one that I think catches people by surprise.
Synchronization means synchronization. What you get, what you send, where you put things, and what you delete — all of these actions are synchronized everywhere.
So if you delete an email on your PC, it’ll be gone from all the other places as well.
Unless you take steps, that is.
Local folders to the rescue
Most email programs allow you to have two different kinds of folders:
- Folders that represent an email account. Usually you can have as many of these as you have email accounts.
- Local folders that are not associated with any account but are kept on your device.
I have seven different email accounts configured, all using IMAP. Anything that happens within any of those accounts is synchronized with their official email repository on the corresponding email server.
I also have Local Folders. These folders exist only on this PC. Anything I do within these folders isn’t synchronized anywhere, since they’re not configured to be associated with any email account.
If I want to delete an email from one of my accounts, all I need do is save a copy somewhere in my local folders first. Then I can delete it from the account and still have my local copy. In my case, I have emails that date back to 2005 available to me offline, here in my local folders. My online accounts only contain email from the last couple of years.
Local folder consideration
Local folders exist only on the device on which you create them.
If something’s in only one place, it’s not backed up.
Those two statements are at odds with one another.
The good news here is that as long as you’re backing up your PC (and that backup includes wherever your email program stores its local folders), then the local folders are getting backed up along with everything else. One of the reasons I prefer image backups is because you don’t even have to think about where the folders might be; an image backup backs up everything.
So make sure your backup is either an image of everything, or that whatever technique you use includes wherever your email program stores its local folders.
Am I even using IMAP?
If you only access your email using your web browser by visiting a website like gmail.com, outlook.com, mail.yahoo.com or whatever, then you are not using IMAP.
If you are using a desktop email program to access your email — either in addition to using web access or as the primary way — then you can determine which protocol you’re using by checking the account configuration.
In the example above, I have one of my Gmail accounts configured to use IMAP, as indicated by Thunderbird under Account Settings. Other email programs will indicate this in different places, but almost always as part of the server configuration information.
If IMAP is not listed, it’ll probably say POP, or POP3, which a) doesn’t keep things in sync, and thus b) doesn’t have this deleting problem. However c) it does download the one and only copy of your email to your device, so you’ll want to make sure you’re backing up properly in the same way discussed above.
If you use a desktop email program, confirm you’re using IMAP and then be aware of the side effects of things like deleting email. Make sure you have backups in place, regardless.
Then, get more email! This one’s worth your time, I promise: Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.
Download (right-click, Save-As) (Duration: 7:57 — 11.0MB)
Subscribe: Apple Podcasts | RSS
3 comments on “Be Careful Deleting Email If You Use IMAP”
“c) it does download the one and only copy of your email to your device”
You can prevent this from happening by configuring your email program to keep downloaded emails on the server. That is what I used to do before I used IMAP. It’s also a good option to avoid the problem of deleting synced emails.
IMAP, by default, doesn’t default to saving a copy of your emails. To keep a copy of your emails for off line use, you need to tell your email program to
Right click the account you want to download from
Click “Synchronization and Storage”
Tick the box “Keep messages in all folders in this account”
I have multiple devices, all of which access my email accounts so for me, IMAP is the best way to go. I have used IMAP on all my devices for many years and I have not had any issues, mostly because I did my research before making any changes (from POP service). I have understood from the start that when I delete an email message while working from my desktop PC, it is removed from the mail server and is no longer available anywhere (It’s simply gone).
I also understand that I am responsible for managing my email store. Even though gmail and outlook.com both provide very ample storage space for email, it remains my responsibility to see that my email storage does not exceed the allowed levels. As one of my monthly system maintenance routines, I go through all my server-side mail folders (they are all under the inbox) and remove anything older than 1 year. As an example, on August 1, 2022, I deleted any email dated prior to August 1, 2021. At the same time, I check out which server-side folders I have, and if I no longer need one, I remove it too.
If you use more than one device to access email (e.g.: your PC AND your mobile phone), maybe the IMAP protocol will make things easier for you too,
I use Thunderbird for Linux, on both my desktop and laptop. Both use IMAP. On the desktop I’ve set the account options (Edit > Account Settings > Synchronization and Storage > Message Synchronizing) and checked “Keep Messages On All Folders for this account on this computer”. That way all messages get backed up during my daily data backup on the desktop. A copy’s also kept in the email provider’s servers. The laptop has limited storage so only the message headers are stored.