meanings of x-mozilla-status codes

User Help for Mozilla Thunderbird
Locked
jnrpsycho
Guest

meanings of x-mozilla-status codes

Post by jnrpsycho »

Is there a list of x-mozilla-status codes and their descriptions. In particular, 9009 and 8009 both seem to mean read and deleted as determined by the last digit. What does the 9 or 8 in the first digit mean?
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Post by tanstaafl »

jnrpsycho
Guest

http://www.eyrich-net.org/mozilla/X-Mozilla-Status.html?en

Post by jnrpsycho »

thanks. I've see this page before but it doesn't explain what the 8 or 9 means in the first digit.
Kab
Posts: 1095
Joined: April 17th, 2006, 11:52 pm

Post by Kab »

The last digit only determines undisplayed (i.e. deleted) message after you know what the code read when "displayed" i.e X-Mozilla-Status: 0009 will mean "mesage undisplayed" BUT either read or unread.
X-Mozilla-Status: 0000 is "unread" and X-Mozilla-Status: 0001 is "read". Both these will be in display if this is the code (and so with a text editor it can be changed)

I don't recall what the first letters stand for at this moment possibly for display options in MUA's added to the RFC 822 Internet Message Format in Thunderbird. Others normally portray the status of replied to, forwarded or flagged.

The 8001, 0009, 8009, 8019, 800b, 801b etc I found many years ago to be deletion codes as I was retracing deleted spam that I rediscovered by changing these. Also 1005, 0015, 0205, 1015, 1205, 0007, 1007, 0017, 0207, 1207 etc have been known for unread messages.
Some even suggest that the status codes "0000" were received, not yet read and undeleted, "8001" after reading the message but not deleted, and "8009" when the message was read and marked for delete.

Caution: I take no reponsibility for the configuration and alteration of these keys. It can cause many issues to appear and Im not too sure of the accuracy of this at the moment. Myself, I don't mess around or tweak much softaare due to forgotten knowledge and lack of time. :(
jnrpsycho
Guest

codes...

Post by jnrpsycho »

I know this is pedantic but any information would be appreciated. I've figured out that XXX9 means read and marked for deleted. I've also managed to get status 1009 means that it has also been forwarded. So the remaining question is what 8009 and 9009 means; or what additional status(es) adds to the first digit to make it an 8 or 9.
Thanks
User avatar
Rod Whiteley
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Post by Rod Whiteley »

The link in the first reply has a link to the source code, where the comments explain some more. It looks like the flags 8000, 4000 and 2000 (together making E000) store the previous priority temporarily when the priority changes. To find out more, you would have to read the code that sets these flags.
Rod
Kab
Posts: 1095
Joined: April 17th, 2006, 11:52 pm

Post by Kab »

Like I said 8009 is definitely a deleted mail. Change it to 8000 and it should show up back again in display if compacting never took place. How I know is we traced some criminals back like this a few years back, retrieving their "deleted" mail to show up again :P

The list of status codes from the source codes released as open source back in '98 are very lengthy. If you want further info into the nitty gritty, a developer here would know and as I don't remember the Netscape source codes at all neither have them with me here you can contact the original Netscape Developer for the Message Database: David Bienvenu and he'll know for sure.
I'm pretty sure his email is something like: bienvenu at nventure dot com but I don't remember that too right now. As I said I am pretty sure in scenarios that "0000" represents when the message is not yet read, "8001" is when message has been read (undeleted), and "8009" when the message was marked for delete.

Some experimental info here:
http://home.att.net/~cherokee67/restoredelmail2.html

Source codes available at:
ftp://ftp.mozilla.org/pub/mozilla.org/

For Thunderbird it would be under thunderbird/releases/(version)
User avatar
Freee!!
Posts: 15562
Joined: January 28th, 2005, 5:52 am
Location: Home, with my son!
Contact:

Post by Freee!! »

And there is a small, experimental program available here that can reset the status to "0000" (in a copy of the mbox file). It is aptly named "Reset Thunderbird Status". It also comes in handy when undeleting messages.
mikerobinson
Posts: 11
Joined: August 26th, 2008, 10:27 am

Re: meanings of x-mozilla-status codes

Post by mikerobinson »

Sorry to bump this really old thread, but it is actually quite trivial to restore all messages from an Mbox file and retain their original statuses, so if it was marked as replied or forwarded, it should still be marked that way. This way you don't get a whole inbox full of brand new emails.

From http://www.eyrich-net.org/mozilla/X-Moz ... us.html?en we can see that 0008 is the status code for a deleted message, so all we have to do is subtract 8 from the last digit of the status codes greater than or equal to 8.

Note, since it is only one digit, counting goes like this: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f. So when we subtract 8, what we want is to have 0-7 remain the same, 8 changed to 0, 9 changed to 1, a changed to 2, b changed to 3, etc.

Here's a small bash script I wrote that will "undelete" the messages and retain their original status instead of resetting everything to a brand new email. Just change the INPUT_FILE and OUTPUT_FILE to the correct locations:

Code: Select all

#!/bin/bash
INPUT_FILE="/path/to/input/file"
OUTPUT_FILE="/path/to/output/file"

sed 's/X-Mozilla-Status: \(...\)8/X-Mozilla-Status: \10/' <$INPUT_FILE >$OUTPUT_FILE
sed 's/X-Mozilla-Status: \(...\)9/X-Mozilla-Status: \11/' <$INPUT_FILE >$OUTPUT_FILE
sed 's/X-Mozilla-Status: \(...\)a/X-Mozilla-Status: \12/' <$INPUT_FILE >$OUTPUT_FILE
sed 's/X-Mozilla-Status: \(...\)b/X-Mozilla-Status: \13/' <$INPUT_FILE >$OUTPUT_FILE
sed 's/X-Mozilla-Status: \(...\)c/X-Mozilla-Status: \14/' <$INPUT_FILE >$OUTPUT_FILE
sed 's/X-Mozilla-Status: \(...\)d/X-Mozilla-Status: \15/' <$INPUT_FILE >$OUTPUT_FILE
sed 's/X-Mozilla-Status: \(...\)e/X-Mozilla-Status: \16/' <$INPUT_FILE >$OUTPUT_FILE
sed 's/X-Mozilla-Status: \(...\)f/X-Mozilla-Status: \17/' <$INPUT_FILE >$OUTPUT_FILE
User avatar
LoudNoise
New Member
Posts: 39900
Joined: October 18th, 2007, 1:45 pm
Location: Next door to the west

Re: meanings of x-mozilla-status codes

Post by LoudNoise »

Locking. As noted, it is an old thread.
Post wrangler
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."
Locked