Jump to content
RichardH

Searching Outlook EML Exports

Recommended Posts

Hello!

 

I'm trying to solve a problem, and Alfred seems to be the closest to a solution I've found.  This is a variation on searching mail.app messages.

 

I've exported my sizable e-mail archive to .eml files - they're text files, in a format remarkably similar to raw SMTP messages (including attachments being embedded, not in a separate folder).  This is the format Outlook (2011?) uses when you drag & drop messages into a folder.  I need to be able to search them - really, by attribute, not just string matches (date ranges, from vs. to, subject, perhaps even compound matches).

 

I've been to this thread: 

However, that code targets Apple Mail mail.app folders and .eml file formats (which are apparently a little different, at least since the attachments aren't embedded).  Since I'm not running Apple Mail, I don't have a working point of reference to gauge the inner workings / success.

 

I've added the folder where my message files are stored to the scope for the 'emfrom' workflow, and I've dropped one of the files into the emfrom object so it'll pickup the file type (which it sees as com.apple.mail.email).  No joy.

 

 

Now, "I don't know what I don't know", so basic suggestions welcomed...  I'd wager a guess that somewhere there needs to be a definition of how to interpret file types (like, extracting the sender's name).

 

Cheers,

Richard

 

Edited by RichardH

Share this post


Link to post

It sounds like you've configured everything correctly, but your email files haven't been indexed by the system.

 

I don't know enough about the Apple vs MS .eml format to give a definitive answer, but it's possible that they're sufficiently different to be unparseable or they're marked as system files (i.e. shouldn't be indexed).

 

You can try re-indexing the .eml files from Terminal. If you change to the directory where your .eml files are, and run mdimport -d1 . to (re-)index them.

 

The command will spit out info on what is has indexed and with which plugin.

Share this post


Link to post

Thanks for the suggestion.

2017-03-08 07:36:57.654 mdimport[19002:41924645] Imported 'Foo.eml' of type 'com.apple.mail.email' with no plugIn.

From prior digging, it seems like lack of a plug-in / metadata parser is also the reason Spotlight doesn't search these files.  I never found a fix for that.  My workaround hack has been to suffix .txt to the filenames so they get indexed as text files, but that's a poor-quality search.

 

Worst-case, how hard would it be to adapt the plug-in for Apple Mail to apply here?

 

Share this post


Link to post

I've done a bit of googling, and .eml files aren't supported, only .emlx (which is the .eml file plus extra data).

 

MailMate has a Spotlight plugin that supports .eml files. Otherwise, I think you'll have to convert them to .emlx to index them.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...