--- /dev/null
+Return-Path: <sanelz@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id BF03D6DE012F\r
+ for <notmuch@notmuchmail.org>; Fri, 1 Jul 2016 03:16:20 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.82\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.82 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,\r
+ RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id W7ouh-8LjJaU for <notmuch@notmuchmail.org>;\r
+ Fri, 1 Jul 2016 03:16:13 -0700 (PDT)\r
+Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com\r
+ [74.125.82.44]) by arlo.cworth.org (Postfix) with ESMTPS id ABB756DE00C8 for\r
+ <notmuch@notmuchmail.org>; Fri, 1 Jul 2016 03:16:12 -0700 (PDT)\r
+Received: by mail-wm0-f44.google.com with SMTP id a66so22513205wme.0\r
+ for <notmuch@notmuchmail.org>; Fri, 01 Jul 2016 03:16:12 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:subject:user-agent:date:message-id:mime-version;\r
+ bh=zx6MR5bombon4brTI5h1GYaWLReBxvMOSDIqKz17158=;\r
+ b=MsPVDXl+Y7yeZAJeBckgbGuiEwZAzOaDCqnz5W4ZgEhzjkzuqvhbz2ko5JSQEw3RTN\r
+ Dp9sl0o8lnzb7r1VI38k2NQPzKsVW6lBTEeEqyz9ApJnU3uif43g9h5bmrjErmnTV2oc\r
+ elUrOSUH9sd2ohMM9fbH6Vqh6XnPsHrHDfVz8sKj1i0iUpo3AsfjesrwxuazGI0wCQrZ\r
+ Igo2f+95CN9xdB2nqbXQipMSv1RJZEEyEUsMDySLiSgDjyKF88OZ1asJHBvrKulG8eXw\r
+ UZqTv1tWHS8yyH4SQuevC4m27pm42BFdOwELYOpjJb7GtZggVoPEj0nl+AJZz83ahA5U\r
+ dO5Q==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:subject:user-agent:date:message-id\r
+ :mime-version;\r
+ bh=zx6MR5bombon4brTI5h1GYaWLReBxvMOSDIqKz17158=;\r
+ b=nJwV/hgyhSomSQf7y3tObzlJIrPzMic+7szCpYHkfkHWGs5235pEWKqxqMUeyiBOvi\r
+ NwA7S2eTbMjtE8gVUXWdoRKv09Pbbj0QeKE/43iXFYF2IYROnoutiSyc2PBE31oa4P03\r
+ K7UCX800geQkvu7OD0rRjeu0nygC70TH4DbMEt4nav9L/0YQqeCiYBqIIFEtmPynEdZ/\r
+ cn8lqMGWbCAtcW2/QqZ2FUBfkvAdxG5+jfzoTx7mFq0pusJRKiM8yyCakaIzMYrAt0b0\r
+ xaJS1NY67KwGUSqq5/BKnXXpV97GmQNVA9Cq4+cE/9d7nwmnnA8yC/As5E40IoOGhKFo\r
+ RQVg==\r
+X-Gm-Message-State:\r
+ ALyK8tI2oyexv6tGmVjO63D3Tg59KjTXvbflWCEBV277OyYKJL8jmNOOvYYFTwjMQt/jkA==\r
+X-Received: by 10.28.211.142 with SMTP id k136mr32356208wmg.29.1467368169661; \r
+ Fri, 01 Jul 2016 03:16:09 -0700 (PDT)\r
+Received: from localhost (cable-146-255-131-70.dynamic.telemach.ba.\r
+ [146.255.131.70])\r
+ by smtp.gmail.com with ESMTPSA id i14sm4213609wmf.13.2016.07.01.03.16.08\r
+ for <notmuch@notmuchmail.org>\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Fri, 01 Jul 2016 03:16:09 -0700 (PDT)\r
+From: Sanel Zukan <sanelz@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: Issue with verifying cleartext signed messages\r
+User-Agent: Notmuch/0.21 (http://notmuchmail.org)\r
+Date: Fri, 01 Jul 2016 12:16:07 +0200\r
+Message-ID: <87oa6hbr4o.fsf@darkstar.example.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-Mailman-Approved-At: Fri, 01 Jul 2016 04:35:16 -0700\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 01 Jul 2016 10:16:20 -0000\r
+\r
+Hi,\r
+\r
+I'm using epa-verify-cleartext-in-region to verify cleartext signed\r
+messages and noticed it will sometimes fail with notmuch, especially\r
+when target mail message is part of longer thread.\r
+\r
+For example, when signed mail is first in thread, body will look like:\r
+\r
+-----BEGIN PGP SIGNED MESSAGE-----\r
+ <content>\r
+-----BEGIN PGP SIGNATURE-----\r
+ <signature>\r
+-----END PGP SIGNATURE-----\r
+\r
+and epa-verify-cleartext-in-region will correctly capture and verify it.\r
+However, when the message is second or third in thread, notmuch will\r
+append spaces in front of it, making it looks like this:\r
+\r
+ -----BEGIN PGP SIGNED MESSAGE-----\r
+ <content>\r
+ -----BEGIN PGP SIGNATURE-----\r
+ <signature>\r
+ -----END PGP SIGNATURE-----\r
+\r
+epa-verify-cleartext-in-region will fail here with: "Invalid cleartext\r
+signed message".\r
+\r
+Error is reproducible - copy the body of message with signature in new\r
+buffer, remove starting spaces and epa-verify-cleartext-in-region will\r
+work.\r
+\r
+Any idea how to solve this? Or even better, is it possible to display\r
+messages flat, without tree view.\r
+\r
+If you can, please CC me with reply as I'm not member of this list.\r
+\r
+Thanks in advace.\r
+\r
+Best,\r
+Sanel\r