Popstate.datFrom MozillaZine Knowledge Base
popstate.dat is a file in the Mail folder of a POP account. It stores the state of messages that Thunderbird has downloaded and left on the POP server.
[edit] The purpose of popstate.datThe file records the information that Thunderbird needs to implement the following choices in your account settings for the POP server:
Messages that are downloaded as headers-only are known as truncated messages. The file is designed to be used by Thunderbird internally, not for users to edit. Even so, you can edit or delete the file to achieve certain results:
[edit] Message statesThe file identifies a state for each message that Thunderbird has downloaded and left on the POP server. Each state specifies what Thunderbird will do with the message the next time it gets mail from the POP server. The states are:
When a message does not appear in the file at all, then its state is unspecified. This normally means that the message has been downloaded and deleted from the POP server. However, if you remove a message from the file and it does exist on the server, then Thunderbird will download the message again. You can change the message states manually, as described in the next section. Note: The file also contains a time stamp for each message, in a numeric format. Thunderbird uses the time stamp to decide when to delete old messages from the server, if you have specified that in the account settings. [edit] Hacking popstate.datBefore you hack the file, ensure that Thunderbird is not in the process of getting mail for the account, and that it will not automatically get mail for the account after a certain time interval. You might need to change your account settings to make sure of this. You do not need to close Thunderbird, but you can if you prefer. To hack the file, first identify the messages that you want to change (unless you want to change all the messages). Then find the right file for the account, edit it and save it. Immediately get mail for the account to make your changes take effect. The following sections describe these steps in more detail. [edit] Identifying messages to act onTo identify a message manually:
Example: The message headers look like this: From - Mon Jan 01 09:00:00 2007 X-Account-Key: account10 X-UIDL: APaxktkAACMqRZj0Jw8jZjL3J7E X-Mozilla-Status: 0401 X-Mozilla-Status2: 00000000 You note the value APaxktkAACMqRZj0Jw8jZjL3J7E (but in most cases you only need to note the last few characters: ...3J7E Notes:
[edit] Finding popstate.datTo find the file, open Thunderbird's Account Settings. Go to the account that you want to work with, then to that account's Server Settings page. Look at the Local directory field (at the bottom of the page) to see the location of the popstate.dat file for the account. Use your operating system tools to go to that location. Note A Thunderbird bug sometimes means that the Local directory field at the bottom of the page might not be visible. In this case, see the article: Dialog too small or too large [edit] Editing popstate.datYou can edit the file using any text editor. Ensure that the editor you use saves the file as plain text, not in any wordprocessing format. You do not need to exit Thunderbird before editing this file. Here are some techniques that you can use:
After you edit the file, save it and immediately get mail for the account. Thunderbird processes the actions that you have specified. Notes:
[edit] Deleting popstate.datIf you delete the file, then Thunderbird has no record of messages that it has downloaded. The next time you get mail for the account, Thunderbird will download all the messages on the server. This might mean that you have duplicate messages in Thunderbird. If you delete a duplicate message from Thunderbird, then Thunderbird might delete the original message from the server (depending on your settings). You can prevent this by changing the file popstate.dat again before you get messages from the server. |
|