]> git.notmuchmail.org Git - notmuch/commit
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)
commit1722ea2c95865cb20cc2578894eca2cdaddc1d7a
tree0505a492862e8f1df311f47991184038f4cedfdd
parent02b554c89616154cbec153cb3938d43d51aae5ad
notmuch-mutt: support for messages that lack Message-ID headers

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
contrib/notmuch-mutt/README
contrib/notmuch-mutt/notmuch-mutt