notmuch-mutt: support for messages that lack Message-ID (v2)

Subject: notmuch-mutt: support for messages that lack Message-ID (v2)

Date: Mon, 9 Feb 2015 10:41:28 +0100

To: notmuch@notmuchmail.org

Cc: zack@upsilon.cc

From: Stefano Zacchiroli


Heya, please find attached the second take on adding support for
messages that lack Message-ID to notmuch-mutt. For context see
http://notmuchmail.org/pipermail/notmuch/2015/thread.html#20079

In this new verison of the patch we start computing the SHA1
incrementally, in case no Message-ID will be found. As soon as the
header is over we parse it (using Mail::Header, to properly handle
line breaks). If a Message-ID is found, it is retourned and SHA1
computation on the rest of the message is aborted. If no Message-ID is
found, SHA1 computation continues, and is used in the end to
synthesize a fake Message-ID in the same way that notmuch itself would
to.

Note that, contrary to the previous version, no changes of the Debian
packaging are needed this time: Mail::Header is contained in the same
package of Mail::Internet that notmuch-mutt was already using, and
Digest::SHA is shipped with Perl itself.

Please consider applying this patch to notmuch's master branch.

Cheers.


Thread: