]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch-mutt: support for messages that lack Message-ID headers
authorStefano Zacchiroli <zack@upsilon.cc>
Sun, 15 Feb 2015 12:39:08 +0000 (13:39 +0100)
committerDavid Bremner <david@tethera.net>
Mon, 16 Feb 2015 12:58:13 +0000 (08:58 -0400)
For those messages, compute a synthetic Message-ID based on the SHA1
of the whole message, in the same way that notmuch would do. See:
http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/sha1.c

To do the above, rewrite get_message_id() to accumulate header lines,
parse them to check for Message-ID, and fallback to SHA1 computation
if it is not present.

Thanks to:
- Jan N. Klug for preliminary versions of this patch
- Tomi Ollila for suggesting an elegant implementation


No differences found