Ticket #334: outlook_msg.patch

File outlook_msg.patch, 1.1 KB (added by Frank J Bruzzaniti, 15 years ago)

patch to support indexing of Outlook .msg files

  • .cc

    old new  
    388388            cout << "\"" << cmd << "\" failed - skipping\n";
    389389            return;
    390390        }
     391    } else if (mimetype == "application/vnd.ms-outlook") {
     392        string cmd = "msg2txt.pl " + shell_protect(file) + " | strings";
     393        try {
     394            dump = stdout_to_string(cmd);
     395        } catch (ReadError) {
     396            cout << "\"" << cmd << "\" failed - skipping\n";
     397            return;
     398        }
    391399    } else if (mimetype == "application/vnd.ms-works") {
    392400        // wps2text produces UTF-8 output from the sample files I've tested.
    393401        string cmd = "wps2text " + shell_protect(file);
     
    797805    mime_map["xlt"] = "application/vnd.ms-excel"; // Excel template
    798806    mime_map["ppt"] = "application/vnd.ms-powerpoint";
    799807    mime_map["pps"] = "application/vnd.ms-powerpoint"; // Powerpoint slideshow
     808    mime_map["msg"] = "application/vnd.ms-outlook"; //Outlook .msg
    800809    // Perl:
    801810    mime_map["pl"] = "text/x-perl";
    802811    mime_map["pm"] = "text/x-perl";