Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Recover mail that was deleted by a policy setting

  • 3 replies
  • 2 have this problem
  • 12 views
  • Last reply by RbbrDuckie

more options

Hello friends of the open source community. I have been using webmail for a long time but my quotum was getting full. I wanted to download all email to my local hard drive and leave only one month of mail on the mail server. I configured my email account as IMAP and told Thunderbird to delete messages that are over 30 days old. It did on the mail server but also on my local hard drive. Now, the size of my 'mail' item is still 103 MB and when I open it with a text editor I can see the headers of all my email. They just don't show up in my inbox. I saw on another website that in the 'Inbox' item I can set X-Mozilla-Status: to '0000' but that doesn't change anything. I also installed the 'Recover deleted messages' add-on but that doesn't work either. So, all my mail is still in the 'Inbox' item on my local hard drive but I can't get them to show in my inbox. I hope someone here has a method of how to do that.

Thanks in advance, RbbrDuckie

Hello friends of the open source community. I have been using webmail for a long time but my quotum was getting full. I wanted to download all email to my local hard drive and leave only one month of mail on the mail server. I configured my email account as IMAP and told Thunderbird to delete messages that are over 30 days old. It did on the mail server but also on my local hard drive. Now, the size of my 'mail' item is still 103 MB and when I open it with a text editor I can see the headers of all my email. They just don't show up in my inbox. I saw on another website that in the 'Inbox' item I can set X-Mozilla-Status: to '0000' but that doesn't change anything. I also installed the 'Recover deleted messages' add-on but that doesn't work either. So, all my mail is still in the 'Inbox' item on my local hard drive but I can't get them to show in my inbox. I hope someone here has a method of how to do that. Thanks in advance, RbbrDuckie

All Replies (3)

more options

re :I configured my email account as IMAP and told Thunderbird to delete messages that are over 30 days old. It did on the mail server but also on my local hard drive.

Imap is a remote view of whatever is on the server. The folders are synchronised and are in effect one and the same. If you delete emails from an imap mail account you are deleting off the server. You cannot delete off server and keep emails in an imap mail account. If you set policy on a folder to delete emails, then that is exactly what occurs. It says "To recover disc space, old messages can be permanently deleted, both local copies and oroginals on the remote server"

Do not compact folders.


Try to recover...you may have tried what sounds similar, but recheck because the info below has worked for others.

In Thunderbird Help > TRoublshooting Information click on 'open folder' button a new window opens showing contents of profile folder name Close Thunderbird now - this is important

click on 'ImapMail' folder click on imap mail account name

you should see the 'Inbox' mbox file - it has no extension. Open the 'Inbox' file using Notepad Each email will start with these lines: this is an example

  • From - Sun Dec 28 18:14:40 2014
  • X-Mozilla-Status: 0009
  • X-Mozilla-Status2: 00800000

Use 'Edit' > 'Find' Starting at the top use the look for this line: X-Mozilla-Status:

Make sure each X-Mozilla-Status: has the number 0001

  • edit the number as required working down through the document.
  • Save the file.
  • delete the 'Inbox.msf' file. A new one will be auto created.
  • Restart Thunderbird.

that should get emails back in Thunderbird Inbox then TB should connect to server. see if that puts the emails back onto the server. Report back on whether this worked.

If it fails to put back on server and seems to delete them again. Go through the same process again - making sure TB is closed/exited first. Do the correction again eg; X-Mozilla-Status: 0001 This time save file as eg: OldInbox then put the 'OldInbox' file in 'Local Folders' account which is under 'Mail' folder not 'ImapMail'.

Restart Thunderbird.

This time you should see all those emails in a new folder called 'OldInbox' in the 'Local Folders' account. Test one email first: Use the right click on email 'copy to' and select the imap mail account Inbox. Allow some time for computer and server to synchronise and then check to see if the email is on the server Inbox via webmail. If yes, then copy more emails over. You can then use the 'OldInbox' as one of your backups, but you should backup the entire Profile. You can do that manually by copying the Profile folder name usually called xxxxxxxx.default. Where the x's are letters and numbers. Make sure TB is closed before copying that folder. Store it on external usb or disk drive.

more options

Hi Toad-Hall, thank you for your quick response. The first technique didn't work. Renaming the mbox file to 'OLDINBOX' gave me more. I am seeing emails going a few months back now, but definitely not all of it. I am reaching out to the mail provider to see if they have a backup. Thanks again.

more options

I see mail in 'OLDINBOX' going back to 14-7-2017. Today it' s 14-11-2017... Could tweaking the numbers of X-Mozilla-Status and X-Mozilla-Status2 be of any help?