Re: [PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

Subject: Re: [PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers

Date: Sat, 24 Jan 2015 17:56:39 +0100

To: notmuch@notmuchmail.org

Cc:

From: Jan N. Klug


On Sat, Jan 24, 2015 at 04:21:06PM +0100, Stefano Zacchiroli wrote:
> On Sat, Jan 24, 2015 at 04:59:16PM +0200, Jani Nikula wrote:
> > On Sat, 24 Jan 2015, Stefano Zacchiroli <zack@upsilon.cc> wrote:
> > > To do the above, rewrite get_message_id() to scan the current message
> > > line by line, incrementally computing a SHA1. As a consequence, drop
> > > the dependency on Mail::Internet.
> > 
> > I am not so sure this is a good idea however, see below.
> [...]
> But I didn't think of header folding, and you're absolutely correct in
> saying that might be a problem.

I disagree. I do not think that header folding is a problem here. RFC
5322 and RFC 2822 state that FWS in the message-id are not allowed (as
opposed to In-Reply: and other headers, where FWS may occur between, but
not inside message-ids).

Folded lines that start with "Message-Id:" might occur, the
regex-pattern used in the patch will not match those lines. 

As far as I have looked in the Mail::Internet sources, further checking of the
correctness of the message-id does not occur, so I do not see any
advantage over the proposed solution. 

> Jan: do you agree with using Mail::Header->new and fall back to
> line-by-line hasing only in case Message-ID is not found? If so, having
> an updated patch based on the one I've posted here would be awesome! If
> you cannot do that just let me know and I'll get to it, eventually :).

I can look into that, but I cannot promise to have it ready in the next
days.

Regards,

Jan
--
Jan N. Klug, Gelsenkirchen

Thread: