]> git.notmuchmail.org Git - notmuch/commit
notmuch-index-message: Correctly parse and index encoded mime parts.
authorCarl Worth <cworth@cworth.org>
Wed, 14 Oct 2009 19:48:58 +0000 (12:48 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 14 Oct 2009 20:29:52 +0000 (13:29 -0700)
commit1c63ec7031926fcd06ac3293d9e402af069ea6ac
treedb591872d84116f2d18cf7b3ea32bbb497bf854e
parent9ab2447e89906f826bb4efbd232c23db9b64b528
notmuch-index-message: Correctly parse and index encoded mime parts.

This cleans up some old code that was very ugly, (separately opening
the mail file and seeking to the end of the headers to parse the
body). I knew gmime must have had support for transparently decoding
mime content, but I just couldn't find it previously.

Note: Multipart and MultipartSigned parts are not handled yet.

Things are quite happy now. The few differences I see with sup are:

1. sup forces email address domains to lowercase, (I don't think I care)

2. sup and notmuch disagree on ordering of multiple thread_id values
   (another thing that's of no concern)

We are still doing one thing wrong when a message belongs to multiple
threads. We've got a nice comma-separated thread-value just like sup,
but then we're also putting in a comma-separated thread-term where
sup does multiple thread terms. That should be an easy fix.

Beyond that, sup and notmuch are still disagreeing on the term lists
for some messages, (I think attachment vs. inline content-disposition
is at least one piece of this). But there are likley still differences
in the heuristics for which chunks of the message body to index. I'll
be looking into this more.
notmuch-index-message.cc