Mail is being deleted automatically

My mail in mail.app is being deleted periodically (about once a month) without me doing anything and it is driving me crazy.


I have even made a clean install of Sierra (10.12.15) and it still happens.


In Mail.app I have my preferences in mailbox behaviours set to Inbox/Trash > Erase deleted messages > Never


Can anyone help?

At the very least I'd like to guard against this by creating a rule that duplicates trashed mail, but this cannot be done as there is no "if mail = trash folder then..."

Posted on Jul 17, 2017 8:46 AM

Reply
25 replies

Jul 18, 2017 6:29 AM in response to jerboalegs

As per this article : Mail for Mac: Mailbox Behaviors preferences in Mail

Trash Mailbox : Note: If you select None, deleted messages may temporarily remain in a mailbox, but are hidden or dimmed. To show or hide these messages, choose View > Show Deleted Messages or View > Hide Deleted Messages.

Mail erases deleted messages at the specified time. Select a setting other than Never to avoid exceeding storage limits set by your email account provider.

Erase deleted messages :

If you selected None for Trash Mailbox, you can choose to have Mail permanently delete messages automatically.

If your email account provider sets up the server to delete older messages, the messages are deleted regardless of how you set this option.

Jul 18, 2017 1:20 AM in response to Glenn Leblanc

Email provider is vidahost - they assure me no auto delete of folders is possible.


I have the same imap email setup on my Android device via Bluemail but there is no such setting to auto delete the trash periodically either - before that I was using the gmail app, and switched just to rule this out but it still persists.

It's either the web hosts or mail.app. Considering this issue has been raised before, as far back as 2001, I think it's mail.app but I can't figure out why. It's been an issue for me for approx 18 months.

Jul 18, 2017 5:03 AM in response to jerboalegs

There are settings on an iPhone to set time limits for trash removal. You have to go to Mail settings and click on the account till you get to the advanced settings. Check all devices for this setting.


Another point is why would you want to use the trash for storage. Point is what's happening is just what is most likely to happen at some point or other either by accident or with a setting change. If you truly never want to delete messages, move them to other mail folders for organization and storage, or use Archive to store them. Trash should be used only what it is intended for----Trash.....

Jul 18, 2017 5:35 AM in response to jerboalegs

Most mail providers have a time limit on their trash or settings for it. Not sure about your provider, but they change from time to time. I had that happen to me where they randomly delete messages in the trash.


Trash is just another folder. But it's intended use is for messages you no longer want. As you see on the Mac, it has settings for removal. An update may change the settings or corruption could happen and settings could change. I've seen that happen several times.

If you want to save messages, then move them to another folder or archive them. What's so hard about that? If you feel the need to use Trash as a storage folder, then expect this to happen from time to time.


As for your Android, I don't know it does. But surely there must be settings for trash removal.

Jul 18, 2017 5:39 AM in response to Glenn Leblanc

Not sure why you are trying to fudge a workaround - the simple fact is mail.app should not be deleting messages off my mail server.

I have never come across a webhost who deletes a clients files after a set time limit, I don't imagine they would be in business long. I host over 100 client websites with various hosts.


You can discuss workarounds all you like, but it doesn't fix the bug.

Jul 18, 2017 5:56 AM in response to jerboalegs

Gmail deletes files in the trash or spam folders after 30 days.

That has nothing to do with any mail client, on any platform.

I expect that other mail providers may work similarly.


Now if you have mail that is in some "regular" folder in your provider's server, it should not be deleted. But there is no evidence to suggest that Mail is somehow involved.

Just to make sure: do the messages simultaneously disappear from the server, your mac and your phone?

Did you perhaps move such messages accidentally to a folder under "On My Mac"? (this will have the effect of removing it from the server, by definition).

Jul 18, 2017 6:04 AM in response to Luis Sequeira1

I don't use gmail anymore, that was ruled out some time ago by switching my android email app abd even going so far as to not have an email app on my device so as to make mail.app the only email client handling my emails.


All the evidence points to mail.app for deleting email, despite the checkbox being ticked off to NOT do this. It is not an accident; it that happens every month or so for 18 months...


They are not being moved, they are being deleted from the server. I have tracked and logged this over a 12 week period, they are being deleted by mail.app - and I am not the only person affected.

Jul 18, 2017 6:15 AM in response to jerboalegs

Gmail is set for 30 days in Trash. ATT is random time. iCloud.com says 30 days. Maybe paid hosts usually have it set to never delete.


I'm not trying to fudge a work around. I've given suggestions to check settings on your devices. I've given you advise on how to store messages you don't want deleted. I'm not an Android user, but that could be the culprit.

You say there is a bug and pointing to Apple's OS, but you haven't proven where the messages are deleted from. Your computer is set correctly according to the images you posted. I doubt they were deleted from there.


If you need to prove which is doing the damage, disable the accounts from one device at a time to test. That way you can determine which is actually deleting the messages.

Jul 18, 2017 6:27 AM in response to Glenn Leblanc

As I have said, I have no other devices. Mail.app is (currently) my only email client. I removed mail clients one by one to deduce which was causing the issue.


... So if mail.app is the only application managing my email please tell me what else it can be apart from my hosts who have demonstrated there are no features that even allow the automatic deletion of emails, the only way is to setup a cron job but that hasn't been done, and there are no cron jobs on my system apart from backups.


So that leaves OSX and Mail as the obvious culprits.

Jul 18, 2017 6:41 AM in response to jerboalegs

Can you disable that account in Mail and test by using webmail? That would prove or disprove Mail being the culprit.


If you think the user settings are corrupt even though they show correctly, you can reset the user defaults:

Remove Container file Mail:

Quit Mail.

In the Finder, select Go, then Go to Folder. Copy and paste the path below and hit GO:

~/Library/Containers/com.apple.mail

Move the whole com.apple.mail folder to the Trash, and open Mail and test. If all goes well, you can empty the trash. You may need to re create your user settings.

If there is a problem or you wish to restore the old file, first, Quit Mail.

Then open the Trash. Right click on the folder and choose Put Back from the menu.

You will need to recreate your personalized settings for Mail.


Note the above is for user settings and will not correct corruption in the Mail application outside of the user settings.

Jul 18, 2017 6:46 AM in response to Glenn Leblanc

Well as mentioned in the original post, I did recently make a clean install of OSX Sierra which will have reset the user defaults (I didn't import any account settings).


I will take your suggestion of using webmail provided by my hosts for the next 45 days to see what happens.


One thing worth mentioning: I have switched the location of trashed mail to be the Trash folder 'On my mac' as opposed to the Trash folder on my mail server, however mail.app is not acknowledging this change and is still moving all my deleted messages to the server...

Jul 18, 2017 7:02 AM in response to jerboalegs

OK. I saw where you stated you did a clean reinstall of OS, but I assumed you migrated your user account. Since it is doing the same as before, I don't see the point in removing any files.


If you changed the Trash to On My Mac, note that it still shows in the main Trash mailbox. It will be a local mailbox if it is acting correctly. The server Trash mailbox would be pushed out to the account in Mail's sidebar. You may have to expand the account in order to view the mailboxes there.

Did you verify this at the webmail site also as to what is happening to the messages?


In addition: The On My Mac mailbox shown in your trash is the trash folder for local mailboxes in general that don't belong to active accounts. The local account mailbox will still show in the Trash for active accounts with that setting.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mail is being deleted automatically

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.