This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

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

undo deletes messages moved from inbox to local folder

  • 4 iimpendulo
  • 1 inayo le ngxaki
  • 1 view
  • Impendulo yokugqibela ngu Matt

more options

I have moved group of 5 messages from Inbox to the wrong local folder (IMAP account, Thunderbird 91.10.0 portable). You can say: nice, we have UNDO, so no problem, eh?

Result of UNDO: all 5 messages disappeared. Completely. From mail server, from Thunderbird, from filesystem. Fortunately, these messages were not important. But what if next one will be?

As I found here, this is rather old problem. I ,have found several questions which are almost identical, but none is solved here:

mrbrucer (4/22/15, 8:10 AM)

After drag and drop of message to a folder; Ctrl-Z (undo) causes message to comepletly disappear

mozilla226 (7/2/21, 8:55 AM)

Emails disappearing when moved to INBOX folder

td540 (3/19/21, 7:43 PM)

dragged message to Local folder, pressed ctrl+Z to undo, message gone

First question is from April 2015. So would somebody finally take this problem seriously and solve it?

I have moved group of 5 messages from Inbox to the wrong local folder (IMAP account, Thunderbird 91.10.0 portable). You can say: nice, we have UNDO, so no problem, eh? Result of UNDO: all 5 messages disappeared. Completely. From mail server, from Thunderbird, from filesystem. Fortunately, these messages were not important. But what if next one will be? As I found here, this is rather old problem. I ,have found several questions which are almost identical, but none is solved here: == mrbrucer (4/22/15, 8:10 AM) == After drag and drop of message to a folder; Ctrl-Z (undo) causes message to comepletly disappear == mozilla226 (7/2/21, 8:55 AM) == Emails disappearing when moved to INBOX folder == td540 (3/19/21, 7:43 PM) == dragged message to Local folder, pressed ctrl+Z to undo, message gone First question is from April 2015. So would somebody finally take this problem seriously and solve it?

All Replies (4)

more options

If you move an email from an imap folder into a folder in the 'Local Folders' mail account then the email has been already been moved off the server - so cannot be displayed in the imap account folders. It would need to be copied back onto server.

The best way to resolve is to use right click on email and select 'Copy to' and choose imap account folder. Then see if it is uploaded to server via webmail view and remains visible in imap account before deleting from Local Folders.

If this is a gmail account: Logon to gmail webmail account via a browser and see if email is in the 'All Mail' folder. Maybe just the label got removed if email was not put into Trash. If yes, then move to Inbox again to reset the 'Inbox' label.

Alternative to try and see if you can recover emails: See if email is still in the 'Local Folders' folder but has been 'marked as deleted' and therefore hidden. Process:

  • Menu icon ≡ > Help > More Troubleshooting Information
  • Under 'Application Basics' section
  • Look for 'Profile folder' (about half way down) and click on 'Open Folder'

This opens in a new window showing contents of profile name folder.

  • Exit Thunderbird now.
  • click on 'Mail' folder
  • click on 'Local Folders' folder

locate the mbox file which has same name of folder and has no extension. I've added an image to give an idea what an mbox file looks like. Although info in image mentions ImportExportTools - ignore those comments - but image should explain which files are mbox file containg emails.

Open mbox file using 'Notepad' or 'Notepad++' or other suitable text editor program.

Oldest email will be at the top. So the ones you added may be at the bottom.

Each email will start with these lines: this is an example

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

Use 'Edit' > 'Find' Try to locate the deleted email, by searching for the Subject or part of the email address etc. OR you may locate it by scrolling to bottom section.

See images below as a guide.

When you have located the email: Look for this line: X-Mozilla-Status: (not X-Mozilla-Status2:)

  • Make sure the X-Mozilla-Status: has the number 0001
  • Save the file.
  • delete the '*.msf' file which has same name as the mbox file you edited and saved. A new one will be auto created.
  • Restart Thunderbird.

check the folder in 'Local Folders' mail account.

Then use the 'Copy to' method to put back on server.

I know this does not solve the issue around 'Undo' after deleting email off server, but perhaps it might recover the emails.

Please report back with results.

more options

Thanks for the help, but I don't really need it. As I wrote, I am using Thunderbird portable, so I'm able to find folders quite easily. I'm even able to recover lost mail from a broken system. I'm a former unix admin, so I know what the mail headers look like :) And as I wrote, these lost messages weren't important to me.

But what if they are and the user is not an old DOS or Unix guru? From the point of view of the average user, the described behavior of Thunderbird is INCORRECT. The user moves the received message from the Inbox to a local folder. He then realizes that he has placed the message in the wrong folder and decides to move it back. The user therefore clicks on Edit and will see the option "Undo Move Message". Yes, not only "Undo", but "Undo Move Message" !! Then he clicks on this option. And the message completely disappears. What did he do wrong?

BMHO It would not be a problem instead of deleting the message from the local folder (and not moving it back to the IMAP server folder as the user expects) simply leave the message in the local folder intact and display something like "this move cannot be undone". Am I right?

more options

By the way, my method of investigation is much more comfortable. Using any file explorer, create new folder (say xxxxx) in the Thunderbird/data/profile/Mail folder, and copy all files without extension from the Thunderbird/data/profile/ImapMail/imap.server.name to this folder (in my case files archive, INBOX, drafts, newsletters, and sent). Then you can run Thunderbird and see all messages in the xxxxx folder without any investigation. With ThunderbirdPortable, This can be done even on different computer .....

more options

vaton1 said

Thanks for the help, but I don't really need it. As I wrote, I am using Thunderbird portable, so I'm able to find folders quite easily. I'm even able to recover lost mail from a broken system. I'm a former unix admin, so I know what the mail headers look like :) And as I wrote, these lost messages weren't important to me. But what if they are and the user is not an old DOS or Unix guru? From the point of view of the average user, the described behavior of Thunderbird is INCORRECT. The user moves the received message from the Inbox to a local folder. He then realizes that he has placed the message in the wrong folder and decides to move it back.

Yet here you are with a problem moving mail off the server and imagining you can put it back through file system manipulation.

The user therefore clicks on Edit and will see the option "Undo Move Message". Yes, not only "Undo", but "Undo Move Message" !! Then he clicks on this option. And the message completely disappears. What did he do wrong?

That does sound like an issue. perhaps file a bug report that the software undo should be more accurate in what it can actually do. https://bugzilla.mozilla.org/

BMHO It would not be a problem instead of deleting the message from the local folder (and not moving it back to the IMAP server folder as the user expects) simply leave the message in the local folder intact and display something like "this move cannot be undone". Am I right?

Probably, so file a bug. Changes to code are not support issues.

Portable editions are not really supported on this forum as it has some odd quirks introduced by the wrapper the portable apps folk use to make Thunderbird think it is installed locally. Before you file a bug make sure you can reproduce the action on a locally installed version as is what the Thunderbird team actually build.