Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 7877C431FCB for ; Sat, 24 Jan 2015 09:04:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.138 X-Spam-Level: X-Spam-Status: No, score=0.138 tagged_above=-999 required=5 tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DevVVvE22vgC for ; Sat, 24 Jan 2015 09:03:58 -0800 (PST) X-Greylist: delayed 401 seconds by postgrey-1.32 at olra; Sat, 24 Jan 2015 09:03:57 PST Received: from mx6.rz.ruhr-uni-bochum.de (mi.ruhr-uni-bochum.de [134.147.64.30]) by olra.theworths.org (Postfix) with SMTP id EB83A431FAE for ; Sat, 24 Jan 2015 09:03:57 -0800 (PST) X-Queued: (qmail 3693 invoked by alias); 24 Jan 2015 16:57:16 -0000 X-RUB-Notes: Internal X-Queued: (qmail 3615 invoked by uid 108); 24 Jan 2015 16:57:15 -0000 X-Qmailscanner: from 134.147.42.227 by mx6.rz.ruhr-uni-bochum.de (envelope-from , uid 102) with qmail-scanner-2.01 (clamdscan: 0.98.1/18526. Clear:RC:1(134.147.42.227):. Processed in 0.076136 secs); 24 Jan 2015 16:57:15 -0000 Received: from mail1.mail.ruhr-uni-bochum.de (134.147.42.227) by mx6.rz.ruhr-uni-bochum.de with SMTP; 24 Jan 2015 16:57:15 -0000 Received: from localhost (mobil-13.rubion.ruhr-uni-bochum.de [134.147.65.233]) by mail1.mail.ruhr-uni-bochum.de (Postfix) with ESMTPSA id A5C37200E2 for ; Sat, 24 Jan 2015 17:57:14 +0100 (CET) Date: Sat, 24 Jan 2015 17:56:39 +0100 From: "Jan N. Klug" To: notmuch@notmuchmail.org Subject: Re: [PATCH 2/3] notmuch-mutt: support for messages that lack Message-ID headers Message-ID: <20150124165639.GA1316@mobil-13.rubion.rub.de> References: <1422090701-19385-1-git-send-email-zack@upsilon.cc> <1422090701-19385-3-git-send-email-zack@upsilon.cc> <871tmkql6j.fsf@nikula.org> <20150124152106.GA23037@upsilon.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150124152106.GA23037@upsilon.cc> User-Agent: Mutt/1.5.23 (2014-03-12) X-Virus-Scanned: clamav-milter 0.98.5 at mail1.mail.ruhr-uni-bochum.de X-Virus-Status: Clean X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 17:04:01 -0000 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 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