Metadata in Mail 2.0


I mentioned earlier that the ability to add metadata to emails and create smart folders based on that metadata is the feature that would secure my continued use of the new Mail 2.0 in Mac OS X 10.4 'Tiger'.

I find it odd that rules can colour messages but you can't manually label an email with a colour. If you could do that then have smart folders based on colour, that would be enough for how I want to organize my email.

But, of course, I'd love arbitrary metadata. And this is where it gets interesting.

Tiger has a command-line tool mdls which lists the metadata for a particular file. It is this metadata that is available to Spotlight.

All my email messages are downloaded by Mail via IMAP and put into ~/Library/Mail and each email message (and attachment) gets its own file.

I just tried mdls on one of those files and it has metadata for things like ItemTitle (subject), ItemAuthors and ItemRecipients. They are actually displayed in the Finder Get Info under More Information too.

If I add a Spotlight Comment in the Finder Get Info window, mdls will show it and I can easily search for it with Spotlight. From the Finder I can set a colour label and that shows up in mdls (and is hence Spotlightable) as well.

Why can't Mail 2.0 make better use of this?

UPDATE (2005-05-7): Joe Weaks suggested AppleScript for setting the background colour on a mail message. A quick Google search revealed the Label Your Mail hack from the O'Reilly Panther Hacks book. I'm still surprised this didn't make it in as a feature in Mail 2.0