Results 1 to 10 of 10

Thread: Support for Mail tags (as implemented by MailMate)

  1. #1

    Default Support for Mail tags (as implemented by MailMate)

    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.

    Thanks.

  2. #2

    Default

    Quote Originally Posted by Eric S View Post
    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.
    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.

    Quote Originally Posted by Eric S View Post
    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.
    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.

  3. #3

    Default

    Quote Originally Posted by Michael Tsai View Post
    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.
    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. :-)

    Quote Originally Posted by Michael Tsai View Post
    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.
    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?

    Thanks for any guidance you can provide!

  4. #4

    Default

    Quote Originally Posted by Eric S View Post
    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?
    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.

    Quote Originally Posted by Eric S View Post
    Do you actually get access to the MailTags internal store?
    Yes, the MailTags developers were kind enough to explain how it works and share some code for reading it.

    Quote Originally Posted by Eric S View Post
    Also, what does it take for an app to support capture?
    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.

    Quote Originally Posted by Eric S View Post
    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?
    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.

  5. #5

    Default

    Quote Originally Posted by Michael Tsai View Post
    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?

  6. #6

    Default

    Quote Originally Posted by Eric S View Post
    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.

  7. #7

    Default

    Quote Originally Posted by Michael Tsai View Post
    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.
    That was the missing piece; thanks!

  8. #8

    Default Any updates?

    Quote Originally Posted by Eric S View Post
    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?
    Quote Originally Posted by Eric S View Post
    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'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?

  9. #9

    Default

    Quote Originally Posted by ejm554 View Post
    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. :-)

  10. #10

    Default

    Quote Originally Posted by Eric S View Post
    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. :-)
    Great! Will you please post an update here if/when you make some progress on it?

Similar Threads

  1. Replies: 3
    Last Post: 10-07-2018, 11:49 PM
  2. MailMate not learning whitelist or blocklist
    By AsafKeller in forum SpamSieve
    Replies: 23
    Last Post: 04-05-2016, 11:36 AM
  3. Scheduling MailMate Backups
    By hsleff in forum EagleFiler
    Replies: 1
    Last Post: 11-20-2015, 09:06 AM
  4. MailMate. Your opinion vs Apple Mail?
    By dcoplan in forum SpamSieve
    Replies: 1
    Last Post: 09-13-2015, 04:49 PM
  5. MailMate Training mailboxes not working
    By FbxSteve in forum SpamSieve
    Replies: 3
    Last Post: 08-19-2015, 10:53 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •