Email labels in Thunderbird with IMAP.
October 26, 2005 6:26 AM   Subscribe

Email labels in Thunderbird using IMAP.

I was all excited to implement my to-do list in Getting Things Done format using Mozilla Thunderbird. I'm using message labels to categorize stuff, storing current items in my inbox on my actual email server. When I go to view the same inbox on my my laptop - none of my email labels are there anymore. Anyway to remedy this or is label info stored locally per machine?
posted by ao4047 to Computers & Internet (11 answers total)
 
I do believe the labels are stored on your computer and not on the Imap server. I have the same setup, and I found my filters under ~/.thunderbird//ImapMail/ (on windows, c:\documents and settings\username\). There are .msf files there that seem to contain the labels. For example, my label is "Tateyama", and there is a Tateyama.msf file with code in there about what is included in the label.

There's also a virtualFolders.dat file in the profile directory that seems to contain a simpler version of that code.

Finally, there's a file in the profile directory called panacea.dat that also points to the virtual folder (along with the rest of the folders).

Probably without these files Thunderbird/firebird won't know about your labels. Have you thought about copying your profile directory from the original setup to the laptop? That might work, but make sure to backup just in case. Still, it's IMAP, so it's not like your messages will go poof.

posted by splice at 8:38 AM on October 26, 2005


Wow. Now that cut off my message something pretty. I guess this doesn't handle HTML entities as well as I thought. Here it is again, without the offending brackets:

I do believe the labels are stored on your computer and not on the Imap server. I have the same setup, and I found my filters under ~/.thunderbird/[profile]/ImapMail/[server] (on windows, c:\documents and settings\username\[etc]). There are .msf files there that seem to contain the labels. For example, my label is "Tateyama", and there is a Tateyama.msf file with code in there about what is included in the label.

There's also a virtualFolders.dat file in the profile directory that seems to contain a simpler version of that code.

Finally, there's a file in the profile directory called panacea.dat that also points to the virtual folder (along with the rest of the folders).

Probably without these files Thunderbird/firebird won't know about your labels. Have you thought about copying your profile directory from the original setup to the laptop? That might work, but make sure to backup just in case. Still, it's IMAP, so it's not like your messages will go poof.
posted by splice at 8:41 AM on October 26, 2005


Sorry splice but you're wrong...

for IMAP mailboxes Thunderbird stores the message labels in the X-Keywords header of the message. For example a message in my mailbox that's not spam and labelled important, has:

X-Keywords: NonJunk $Label1

in the message header.

No idea if this is a Thunderbird-specific extension of IMAP or if it conforms to some standard...
posted by chuma at 9:01 AM on October 26, 2005


I seem to have confused features with each other, I was talking about virtual folders after all.

However, chuma, let me say this: No, YOU'RE wrong. I just labeled a message and viewed the raw file on my IMAP server, and there is no X-Keywords.

I have searched and confirmed that the label is kept in the appropriate .msf file in the profile directory, under ImapMail/[servername]/. For example, I just labeled a message in my inbox with label 1, and the file I found the code in is [profile directory]/ImapMail/localhost/INBOX.msf.
It is set using code such as this:


@$${211{@
&(2A4A4=2000003)>[-10637:^80(^88^2A4A4)(^8B=0)(^82^28E80)(^85^19FB)
(^81=yo)(^83^2A48E)(^86^2A48F)(^89=1)(^96^8C)(^87=887)(^9B^90)(^8E=10637)
(^8A=1)]
@$$}211}@

81 is the subject, 8A is the label (here label #1). You can find a quick reference of the fields at the top of the file This file seems to contain a lot of other stuff too, but if it's for the same mailbox, I figure you might be able to copy it over. Backup, as always.

chuma's idea of the label being stored on the server might be a more recent or older version than what I have. I'm using version 1.0.7 (20050923). I'm sure that there is no X-Keywords that is being created anywhere for labels by this version of Thunderbird.

splice@frodo .maildir $ pwd
/home/splice/.maildir
splice@frodo .maildir $ grep --directories=recurse -i X-Keywords *
splice@frodo .maildir $
posted by splice at 9:41 AM on October 26, 2005


Best answer: Weird. I have TBird 1.0.2/Linux at work and 1.0.7/Win32 at home and I did exactly what you did: marked a message in TBird and then looked at the raw file on the server. X-Keywords is modified. Unmark it and $Label1 is no longer in X-Keywords. Practically ever message I've got has this header to keep the Junk/NonJunk status:

[victor@amaterasu mail]$ grep --directories=recurse -i X-Keywords * | wc
11275 20911 445076

I just installed a fresh Thunderbird 1.0.7 on Windows on the machine next to me, and it also does what I've described.

Sifting through bugzilla I found this comment which says that labels are stored on the server *if* the server supports it.

And finally, here's a list of IMAP servers that support keywords (labels). ao4047, I guess if your mail provider isn't using the right server (or has simply disabled this feature) you can't do what you set out to.

(And splice - I wasn't trying to be a dick, I was just in a hurry - we're both right)
posted by chuma at 10:29 AM on October 26, 2005


Response by poster: Thanks guys. I'm surprised Dreamhost wouldn't support this!
posted by ao4047 at 11:01 AM on October 26, 2005


Response by poster: (let me say - doesn't - I don't know if they would or not)
posted by ao4047 at 11:20 AM on October 26, 2005


chuma, I wasn't trying to be a dick either -- it's just very hard to say who is "wrong" when you talk accross platforms and versions.

I run courier-imap (version 4 something), which is fairly standard as far as imap servers go. It's also listed as one of the servers that should work, so obviously its default setup (under gentoo at least) doesn't enable that feature.

At any rate, if your server doesn't support the feature, you might like to try copying the .MSF files from the original computer to the laptop. These files seem to keep the index of the messages with various information, including the labels.

Gotta love programs like this that act differently depending on the phase of the moon and the color of your pee (as a teacher of mine would have said) :)
posted by splice at 11:31 AM on October 26, 2005


Oh, and chuma: nice server name. Now I've got a new scheme for when I rebuild my home network :) Fudo Myo-o would be a good name for a firewall, though harder to type than frodo and sam.

And a note to the submitter: MSF files are actually non-vital. If you delete them, they are recreated when thunderbird starts up. I imagine this would not be nice in a case where your labels are stored locally (lose all your labels?), but as far as we're concerned, it should be safe to try and copy the good ones with labels over to the laptop and see. Just delete the msf files if something is amiss, and you'll be back to your original setup. If nothing's amiss, well, your labels should be there.
posted by splice at 11:37 AM on October 26, 2005


heh - not my server, I only eat up tons of disk space with IMAP folders on it - but thanks.

That box runs UW-IMAP I believe, so it seems to support keywords out of the box.
posted by chuma at 3:11 PM on October 26, 2005


Response by poster: Thanks again, y'all for your help!
posted by ao4047 at 9:35 AM on October 27, 2005


« Older Foot Avulsion Fracture advice   |   Books for the plane? Newer »
This thread is closed to new comments.