Hi, about a year ago, I switched from Mail.app (including the MailTags bundle) to MailMate. So my older emails have MailTags-formatted tags while my newer ones use MailMate style tags. It was initially surprising to me to see that EagleFiler happily imported the MailTags tags but not the MailMate tags. But I guess I understand why: the MailTags tags are stored as custom headers within the message itself, while MailMate uses IMAP keywords.
But I still want my MailMate tags to be imported into EagleFiler! And for bonus points, it’d be great to have the reverse work if I need to re-import that mail from EagleFiler back to MailMate.
Is there any possible way to make this work? I would be willing to investigate scripting and/or MailMate bundle hacking if that’s what’s needed.
EagleFiler is not importing from the MailTags headers. I think those are deprecated. Instead, it looks up the message in the Apple Mail and MailTags data stores.
I don’t think the MailMate tags are in the data that it sends to EagleFiler. You could try asking the MailMate developers whether there’s a way to access them from a bundle. They could then be passed along to the AppleScript command that “Command ‣ EagleFiler ‣ Add” uses.
As a SW guy myself, I’d be interested to know a bit more about how this works. Presumably this is only possible with apps that support capture? Do you actually get access to the MailTags internal store? Also, what does it take for an app to support capture? If I were to ask Benny over at MailMate to add this support, I want to know how much work I’m asking him to do.
So I’m definitely interersted in pursuing the MailMate bundle approach. I believe the current bundle only imports .eml records, not .mbox records. However, MM has a separate export bundle that exports messages as mbox files. I think what I’d want to do is create a bundle that combined the ability to export a set of messages from MM in mbox format, and somehow include the tags. I’ll start looking into that, but my first immediate question is, assuming I can access the tags info, what do I actually do with it? Do I have to crack open the mbox file to add that metadata?
No, in fact EagleFiler can import the tags from Mail even when not capturing (e.g. if you manually drag and drop one of its mailboxes from the Finder). It will recognize that the messages are from Mail and look up the info.
Yes, the MailTags developers were kind enough to explain how it works and share some code for reading it.
The app needs to support enough AppleScript to be able to tell EagleFiler which items are currently selected and to access their data. Please see this page.
This is tricky because the mbox format doesn’t support tags. With .eml files, you can send each one to EagleFiler individually and tell it which tags to add. But this is not very efficient.
EagleFiler does support a different file format that it can more quickly import into a single mailbox file. You create a folder whose name ends with “.efmaildir”. Inside, save a series of message files: 1.eml, 2.eml, etc. Next to each, save 1.plist, 2.plist, etc. The plist files are dictionaries with key “tag_0” set to the first tag for that message, “tag_1” set to the next, etc.
This is all good into, thanks. Just to make sure I understand this “.efmaildir” format, I tried manually creating a “Test.efmaildir” folder, with two messages inside as you described. But when I drag that folder into the EF drop pad (or use the capture key on it), it’s just imported as a set of separate files. Can this file format not be imported via these methods, or might I have something wrong with the format?
Yes, any of those methods should work. I think I forgot to mention that the folder also needs an Info.plist file with a “mailbox” key that has the name of the mailbox file that you want it to create.
I’m also interested to know if it there is a good way to capture MailMate tags or IMAP keywords in EagleFiler. Personally, I’m looking for an implementation that will allow me to use IMAP keywords and/or (gulp) Finder tags with my emails, and subsequently capture them in my EagleFiler-based archives.
@Eric S: Has anything happened with this effort since you began looking into it? Did you ever reach out to MailMate’s developer?
I did speak to Benny (MM’s developer). He thought it could be doable by extending the existing EagleFiler bundle. It’s been on my todo list to look into it, but I’ve not gotten around to it yet.