From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 0A4F46DE1444 for ; Wed, 8 May 2019 10:19:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -2.698 X-Spam-Level: X-Spam-Status: No, score=-2.698 tagged_above=-999 required=5 tests=[AWL=-0.196, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s8DIgq87IwBx for ; Wed, 8 May 2019 10:19:23 -0700 (PDT) Received: from smtp-3.sys.kth.se (smtp-3.sys.kth.se [130.237.48.192]) by arlo.cworth.org (Postfix) with ESMTPS id 91ABE6DE11A0 for ; Wed, 8 May 2019 10:19:23 -0700 (PDT) Received: from smtp-3.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-3.sys.kth.se (Postfix) with ESMTP id ACD253A3D for ; Wed, 8 May 2019 19:19:20 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-3.sys.kth.se ([127.0.0.1]) by smtp-3.sys.kth.se (smtp-3.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wn9_xQonDalV for ; Wed, 8 May 2019 19:19:19 +0200 (CEST) X-KTH-Auth: ekeberg [2001:6b0:1:1de0:d56c:f4ec:58a2:6dff] DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kth.se; s=default; t=1557335959; bh=Vu7/K33X7vvKfvU3e1Wg67ElbM6+194lN13Pq3Qgt/E=; h=From:To:Subject:Date; b=hltKkDyccfjVI5SIBnRS4e+oGUR5r17jYYpaL+6uzs/XoWtYXxJzc8IByJdgOOMqQ nWPE0QgBetMbLl+XDW9ne1KAS/BvaAYmjtEjdIPbw7v94J5MuW6QB5i59otQ4vqK1Y krRHkoGaTpwJqa0e9wyP02rgA6TTjPlhozma9nzQ= X-KTH-mail-from: ekeberg@kth.se X-KTH-rcpt-to: notmuch@notmuchmail.org Received: from swing (unknown [IPv6:2001:6b0:1:1de0:d56c:f4ec:58a2:6dff]) by smtp-3.sys.kth.se (Postfix) with ESMTPSA id 2DCE95A23 for ; Wed, 8 May 2019 19:19:18 +0200 (CEST) From: =?utf-8?Q?=C3=96rjan_Ekeberg?= To: notmuch@notmuchmail.org Subject: [BUG] emacs: notmuch-mua-attachment-check finds triggering string inside forwarded messages Date: Wed, 08 May 2019 19:19:18 +0200 Message-ID: <87bm0cc19l.fsf@swing.csc.kth.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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: Wed, 08 May 2019 17:19:25 -0000 Hi all, I have found what seems to be a bug, or at least a misbehaviour of the "missing attachment warning" implemented by the otherwise so nice notmuch-mua-attachment-check. It works fine to detect the regexp for attachments in simple messages. The problem is that it also triggers the warning if a matching string is present inside a forwarded message. This is particularly annoying when forwarding messages originating from MS-Exchange since those seem to always include a hidden header "X-MS-Has-Attach" where the word "Attach" constantly leads to false missing-attachment warnings. Would it be possible to somehow restrict the regexp search to the part of the message actually being authored? Would it be too simplistic to end the search at the first occurrence of "\n\n<#" ? /=C3=96rjan