Thunderbird:Undelete All Messages: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Undelete All Messages)
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
If you or an antivirus program has recently edited the Thunderbird POP mbox mail database file and many messages are missing or many duplicate messages have appeared, consider restoring all the messages you have deleted since compacting.  For restoring only one message, see [http://kb.mozillazine.org/Undelete_a_message the Mozillazine Knowledge Base entry].  For IMAP accounts or POP accounts where the messages are still stored on the server, again see [http://kb.mozillazine.org/Undelete_a_message the Mozillazine Knowledge Base entry].  To find the location of the database file, once again see [http://kb.mozillazine.org/Undelete_a_message the Mozillazine Knowledge Base entry].  Note that deleting a message in Thunderbird hides the message and marks it for deletion, and compacting a folder removes the messages that are marked for deletion from the mail database file, so messages that have not been deleted from the mail database file can be restored.  First consider closing Thunderbird and deleting the file with the msf extension, as it is simply an index file and will be regenerated correctly if you delete it.  If you restart Thunderbird and the problem has not been fixed, close Thunderbird and open an editor that allows for regular expression find and replace.  If you do not use [http://en.wikipedia.org/wiki/Vi VI] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 VIM] or the like you will need to alter the instructions for your editor.  Back up your mail database file and then open it in VI, and type the following:
If you or an antivirus program has recently edited the Thunderbird POP mbox mail database file and many messages are missing from the corresponding Thunderbird folder, consider restoring all the messages you have deleted since compacting the folder.  For restoring only one message, see [http://kb.mozillazine.org/Undelete_a_message the Mozillazine Knowledge Base entry].  For IMAP accounts or POP accounts where the messages are still stored on the server, again see [http://kb.mozillazine.org/Undelete_a_message the Mozillazine Knowledge Base entry].  To find the location of the database file, once again see [http://kb.mozillazine.org/Undelete_a_message the Mozillazine Knowledge Base entry].  Note that deleting a message in Thunderbird hides the message and marks it for deletion, and compacting a folder removes the messages that are marked for deletion from the mail database file, so messages that have not been deleted from the mail database file can be restored.  First consider closing Thunderbird and deleting the file with the msf extension, as it is simply an index file and will be regenerated correctly if you delete it.  If you restart Thunderbird and the problem has not been fixed, close Thunderbird and open an editor that allows for regular expression find and replace.  If you do not use [http://en.wikipedia.org/wiki/Vi VI] or [http://en.wikipedia.org/wiki/Vim_%28text_editor%29 VIM] or the like you will need to alter the instructions for your editor.  Back up your mail database file and then open it in VI, and type the following:


  :%s/^X-Mozilla-Status: \([0-9A-Fa-f][0-9A-Fa-f][0-9A-F]\)9/X-Mozilla-Status: \11/
  :%s/^X-Mozilla-Status: \([0-9A-Fa-f][0-9A-Fa-f][0-9A-F]\)9/X-Mozilla-Status: \11/
Line 9: Line 9:
  :%s/^X-Mozilla-Status: \([0-9A-Fa-f][0-9A-Fa-f][0-9A-F]\)[Ff]/X-Mozilla-Status: \17/
  :%s/^X-Mozilla-Status: \([0-9A-Fa-f][0-9A-Fa-f][0-9A-F]\)[Ff]/X-Mozilla-Status: \17/


These commands set the delete bit the X-Mozilla-Status headers of each message to zero.  For a list of all the bits in the X-Mozilla-Status header, see [http://www.eyrich-net.org/mozilla/X-Mozilla-Status.html?en this page].
These commands set the delete bit of the X-Mozilla-Status header of each message to zero.  For a list of all the bits in the X-Mozilla-Status header, see [http://www.eyrich-net.org/mozilla/X-Mozilla-Status.html?en this page].

Latest revision as of 23:36, 24 January 2008

If you or an antivirus program has recently edited the Thunderbird POP mbox mail database file and many messages are missing from the corresponding Thunderbird folder, consider restoring all the messages you have deleted since compacting the folder. For restoring only one message, see the Mozillazine Knowledge Base entry. For IMAP accounts or POP accounts where the messages are still stored on the server, again see the Mozillazine Knowledge Base entry. To find the location of the database file, once again see the Mozillazine Knowledge Base entry. Note that deleting a message in Thunderbird hides the message and marks it for deletion, and compacting a folder removes the messages that are marked for deletion from the mail database file, so messages that have not been deleted from the mail database file can be restored. First consider closing Thunderbird and deleting the file with the msf extension, as it is simply an index file and will be regenerated correctly if you delete it. If you restart Thunderbird and the problem has not been fixed, close Thunderbird and open an editor that allows for regular expression find and replace. If you do not use VI or VIM or the like you will need to alter the instructions for your editor. Back up your mail database file and then open it in VI, and type the following:

:%s/^X-Mozilla-Status: \([0-9A-Fa-f][0-9A-Fa-f][0-9A-F]\)9/X-Mozilla-Status: \11/
:%s/^X-Mozilla-Status: \([0-9A-Fa-f][0-9A-Fa-f][0-9A-F]\)[Aa]/X-Mozilla-Status: \12/
:%s/^X-Mozilla-Status: \([0-9A-Fa-f][0-9A-Fa-f][0-9A-F]\)[Bb]/X-Mozilla-Status: \13/
:%s/^X-Mozilla-Status: \([0-9A-Fa-f][0-9A-Fa-f][0-9A-F]\)[Cc]/X-Mozilla-Status: \14/
:%s/^X-Mozilla-Status: \([0-9A-Fa-f][0-9A-Fa-f][0-9A-F]\)[Dd]/X-Mozilla-Status: \15/
:%s/^X-Mozilla-Status: \([0-9A-Fa-f][0-9A-Fa-f][0-9A-F]\)[Ee]/X-Mozilla-Status: \16/
:%s/^X-Mozilla-Status: \([0-9A-Fa-f][0-9A-Fa-f][0-9A-F]\)[Ff]/X-Mozilla-Status: \17/

These commands set the delete bit of the X-Mozilla-Status header of each message to zero. For a list of all the bits in the X-Mozilla-Status header, see this page.