Enabling the inbuilt msg ifilter on sharepoint (even 64bit!)

One of our big decisions on the proposed physical architecture of our sharepoint farms has been can we go 64bit on the index server. For us the ability to index .msg files is crucial and until now I thought I would have to purchase a third party ifilter. The problem being that the third party does not have a 64bit version of their ifilter and initial discussion with the vendor indicated that building a 64bit ifilter would not be easy.

Some recent updates to the technet sharepoint doco were pointed out to me yesterday that listed msg indexing support as being available out of the box.
This is the relevant page:-

File types and IFilter reference (Office SharePoint Server)
URL: http://technet2.microsoft.com/Office/en-us/library/09357d8e-37b9-4e96-b8fd-f17b990d010a1033.mspx

So this doc basically states that msg filters are inbuilt. So I do a search of some content that is in the body of a .msg file and no results are returned.

Now I’ve been down this path before with the foxit pdf ifilters so I’m pretty sure that it is a problem with missing values in the registry. I also note at the bottom of the above reference page is a link to an article on search onenote 2007 files. This document provides hints as to the missing registry keys.

Install and register the OneNote IFilter (Office SharePoint Server 2007)
URL: http://technet2.microsoft.com/Office/en-us/library/2e715e42-c09b-4b4f-a082-b19e1cad96031033.mspx

Crank up regedit check that the :-

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.msg keys exist.
(They should do, all my installs have this by default)

The following key is the one that is missing.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\Filters\.msg]
“Extension”=”msg”
“FileTypeBucket”=dword:00000001
“MimeTypes”=”application/msoutlook”

[Edit 08JUL2010 – changed MimeTypes key above as per testing from others. Thanks to devparts comment below]

Now, I have taken a guess on the mimetype for outlook. I can find no mimetypes for .msg files in the registries on my servers and my workstations. A web search yielded 3 possibilities, “application/vnd.ms-outlook”, “application/x-msg” & “application/msoutlook” 

So the next thing was to restart the office search service, and iisreset. I think reset all crawled content (purge the index). Then I ran a full crawl.

Fortunately I got lucky on the mimetype and the index successfully crawled the content of the email! Now for the caveats. I’ve only done basic testing. I haven’t checked if the msg ifilter will pull an attachment (eg word doc) and index that as well. Also I haven’t checked this with Microsoft, though I think it is worthy of a bug report (at least in the doco).

Also thanks to Mutaz from MCS for his initial guidance on pointing me in the right direction this.

Advertisement
Posted in ifilter, Search, sharepoint
24 comments on “Enabling the inbuilt msg ifilter on sharepoint (even 64bit!)
  1. […] msg iFilter on MOSS 2007. It's just not active be default. Gavin Adams made a brilliant post to point this out and to deliver a solution how to activate it on your MOSS environment.Also, […]

  2. Gavin Adams says:

    Just an update on this post.
    Tom Vandaele has posted on this topic too.
    http://trycatch.be/blogs/tom/archive/2007/11/05/build-in-msg-ifilter-on-moss-2007.aspx

    Tom thanks for the link to me.

    Also Tom has completed some testing of the indexing of attachments and it works!

  3. […] that a third-party development is needed to achieve this ability…Then I found Gavin Adams post and Tom Vandaele post that wrote that the ability to deep search within msg files is a MOSS […]

  4. Gavin Adams says:

    Lirliron,
    thanks for your post.

    I noticed that in your article that you had better sucess with the following setting.

    “MimeTypes”=”application/msoutlook”

    I’ll do some further testing and check it out.

    Thanks,
    Gavin

  5. Wolfgang says:

    I can confirm that attachments of type .docx and .xlsx are searched. At my site I am unable to filter .txt and .doc files, however.

  6. […] müssen in der Registrierdatenbank diese beiden Einträge gemacht werden (thanks to Gavin Adams Blog-entry for the info about the Outlook mime types):   Windows Registry Editor Version 5.00 […]

  7. […] but it is a risky thing to do and does not work properly.The 3 blogs I have found are as follows :Gavin AdamsTom VandaaleLirlironIf you follow their advise you will firstly be taking a risk by altering your […]

  8. Cipri says:

    hi there,

    it works for me when i do a file share crawl, but not when i use a custom protocol handler. any thoughts?

    cheers,
    cipri

  9. gavinadams says:

    Sorry Cipri I don’t have any experience with using custom protocol handlers.

  10. Angelo says:

    Just as Wolfang is unable to search for txt files, I have the same problem, I can search for PDF, DWG, etc but not the most simple file of all … txt
    very odd, any ideas?

  11. gavinadams says:

    Hi Angelo,
    I just checked my install. It’s 32bit out of the box with SP1 installed.

    I added a txt file and did a full crawl and I was able to search for content in the txt file correctly.

    Not sure what it going on with your install. Check that the .txt extension exists in the 2 registry paths that I mention in the article above. Also check that you can do a full crawl and that there are no relevant errors in the crawl log.

  12. Angelo says:

    Gavin

    I too am able to search for text files, the only problem is when there is a text file attached to a message and I search for that text inside the message, I cannot search it.
    ( I do have msgIFIlter)
    I can search inside a message in any other file extension but text.
    So basically the problem is to search in a message that has a text file attached to it. 😦

    Any ideas?

  13. Nick says:

    Gavin, Any help is greatly appreciated.

    I created a site custom column and mapped to metadata property. Uploaded a text file, plain simple .txt file and give value for custom metadata property and did full crawl. When I search (from with the portal using basic search screen,) the .txt file is showing in results.

    The problem is, When I search the same custom metadata property using API with FullTextQuery and SQL, the query is returning all Office documents like .Doc, .ppt, .xsl files but not the text file.

    Any advice.

  14. Kobi Keren says:

    Hi Gavin,
    I have wss 3.0 , ihave checked according to your post but didnt find HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.msg keys
    is there any way to add them manualy ? if the answer is yes what will be the values ?

    Best Regards,
    Kobi

  15. Marc says:

    What is the CLSID you have associated with the following:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.msg

  16. Prashanthspark says:

    I have to write a iFIlter for .eml files

    How can i startup

  17. decatec says:

    Veru useful, we are grappling with email for a MOSS Records Center

  18. Rosa says:

    Hi Gavin,

    Thanks for the post it was really handy.
    With this post and the Foxit PDF iFilter we are able to index MSG files including attachments on our portal.

    However we have found that not all MSG-Attachments are indexed. We got the same e-mail from two different sources, one gets indexed the other doesn’t. We have found the difference laying in some MAPI Properties of the attachment. Unfortunately we cannot figure out which one is causing the problem.

    Anyone got any idea, which MAPI Property is the most likely to be needed by the SharePoint crawler?

    Thanks
    Rosa

  19. […] that a third-party development is needed to achieve this ability…Then I found Gavin Adams post and Tom Vandaele post that wrote that the ability to deep search within msg files is a MOSS […]

  20. Excellent Post.

    Thanks for this great help.

    Really appreciative.

  21. […] Enabling the Inbuild MSG iFilter on SharePoint to turn on reading […]

  22. Azzie Srnsky says:

    This can be a really very good go through for me, Must admit that you just are 1 of the best bloggers I ever saw.Thanks for posting this informative write-up.

  23. asembler says:

    Thanks for the article – exacly what I was looking for.
    One thing I’m not clear on – in what format the extra keys/values need to be added to the Registry. Could you please clarify?

    “Extension”=”msg”
    “FileTypeBucket”=dword:00000001
    “MimeTypes”=”application/msoutlook”

    Are these keys under .msg key, or are these String, DWord values?

Comments are closed.

%d bloggers like this: