From: Jani Nikula Date: Sat, 30 Aug 2014 07:37:43 +0000 (+0300) Subject: Re: [Vagrant Cascadian] Bug#759646: notmuch-emacs: switching mode= to invalid value... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4e19c3ea4aeb0a6053393d12ecd50d651b8d3dcd;p=notmuch-archives.git Re: [Vagrant Cascadian] Bug#759646: notmuch-emacs: switching mode= to invalid value sends unencrypted mail --- diff --git a/c0/a26c2a2cdaabd443ad4f75cb677370dc4aedfe b/c0/a26c2a2cdaabd443ad4f75cb677370dc4aedfe new file mode 100644 index 000000000..b1b6ede20 --- /dev/null +++ b/c0/a26c2a2cdaabd443ad4f75cb677370dc4aedfe @@ -0,0 +1,98 @@ +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 22C2B431FBC + for ; Sat, 30 Aug 2014 00:37:53 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 szU4BsqmIMFp for ; + Sat, 30 Aug 2014 00:37:48 -0700 (PDT) +Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com + [74.125.82.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 8E743431FB6 for ; Sat, 30 Aug 2014 00:37:48 -0700 + (PDT) +Received: by mail-wg0-f41.google.com with SMTP id l18so3031607wgh.0 + for ; Sat, 30 Aug 2014 00:37:46 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type; + bh=MNet3gcTnl36g+oeRCo0FQmVoD8Ut7RYLMd/dQsgrwQ=; + b=jcLnt5wmCo1ZbsGsnjxQQrVdVS4eSjsAGB1Oenprphw9LTJZAY9YM7iWC3oXZbWi1c + VCDX30xhPlySxo+3MYhlNTwnFA4owabxI0zKO9bKtBTNrdOldyfbmKFqEHt7S4cft9gQ + NhVW98ix12ha4Y9LZGMTnBBQ5FiWsN52DoNuiafg91IF/j7TM/vT2VDyThnwkqzcrm5T + qZtPOCnbtXfvHWHlmBfKfByX/EMlyfleMexEp1439RyJnMOpaWauFjxsWX0TPkCggCTu + tbTNwwL1yMDTqz6EgTEZ4CoxpiSV7jtBTZjoHRDugduux183K3Qou+5bQxZT+23rNYqQ + xvlQ== +X-Gm-Message-State: + ALoCoQky1g6DsF+GAHKZtbyEfKflskGF8oR7w/DRf22rD9xhXYBzpZKi2/ShSWneTCFEiueIOekh +X-Received: by 10.194.63.205 with SMTP id i13mr18828746wjs.74.1409384265928; + Sat, 30 Aug 2014 00:37:45 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c374-75.dhcp.inet.fi. + [88.195.116.75]) + by mx.google.com with ESMTPSA id dh7sm3258459wib.18.2014.08.30.00.37.44 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 30 Aug 2014 00:37:45 -0700 (PDT) +From: Jani Nikula +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: [Vagrant Cascadian] Bug#759646: notmuch-emacs: switching mode= + to invalid value sends unencrypted mail +In-Reply-To: <87lhq7npcw.fsf@maritornes.cs.unb.ca> +References: <87lhq7npcw.fsf@maritornes.cs.unb.ca> +User-Agent: Notmuch/0.18.1+65~g9f0f30f (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sat, 30 Aug 2014 10:37:43 +0300 +Message-ID: <87k35q2zso.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain +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, 30 Aug 2014 07:37:53 -0000 + +On Thu, 28 Aug 2014, Vagrant Cascadian wrote: +> When sending mail from notmuch-emacs interface, I usually use pgpmine +> signatures, but sometimes I want to send a signed encrypted message, so +> I manually edit the mode=sign to mode=signencrypt ... but if I make a +> typo, i.e. mode=signinvalidencrypt, notmuch happily and without warning +> sends the mail unencrypted. +> +> i.e. #secure method=pgpmime mode=signinvalidencrypt will end up +> sending an encrypted message (with the <>, of course). +> +> It seems like it should error out if the mode= is set to an invalid or +> unknown value, rather than sending mail in the clear. +> +> I've got this set up in ~/.emacs, not sure what all else might be coming +> into play: +> +> '(message-setup-hook (quote (mml-secure-message-sign))) +> '(notmuch-crypto-process-mime t) + +I'm inclined to think this is a bug in message-mode. But we should +probably try to see what we could do to mitigate this. + +As a workaround of sorts, I'd suggest not messing with the #secure tag +manually. Instead, you can use mml-secure-message-sign and +mml-secure-message-sign-encrypt to change the mode. + +BR, +Jani.