]> granicus.if.org Git - neomutt/commitdiff
Add $autocrypt_reply
authorKevin McCarthy <kevin@8t8.us>
Wed, 7 Aug 2019 21:31:53 +0000 (14:31 -0700)
committerRichard Russon <rich@flatcap.org>
Mon, 19 Aug 2019 23:14:28 +0000 (00:14 +0100)
This allows turning off the force-autocrypt mode when replying to an
autocrypt email.

Co-authored-by: Richard Russon <rich@flatcap.org>
globals.h
init.h
send.c

index b46684f738b9f342026179533d19b64e84411d6e..b7ea86d4d9861e2aa7d6f169d523a3fd6007af40 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -207,6 +207,7 @@ WHERE bool C_Askbcc;                         ///< Config: Ask the user for the b
 WHERE bool C_Askcc;                          ///< Config: Ask the user for the carbon-copy recipients
 #ifdef USE_AUTOCRYPT
 WHERE bool C_Autocrypt;                      ///< Config: Enables the Autocrypt feature
+WHERE bool C_AutocryptReply;                 ///< Config: Replying to an autocrypt email automatically enables autocrypt in the reply
 #endif
 WHERE bool C_Autoedit;                       ///< Config: Skip the initial compose menu and edit the email
 WHERE bool C_AutoTag;                        ///< Config: Automatically apply actions to all tagged messages
diff --git a/init.h b/init.h
index d4191a99b3854a6266d67c7a81682761fd72ed1c..57635c7855f886ff55ba20b6c5cf9cdddf1786d7 100644 (file)
--- a/init.h
+++ b/init.h
@@ -421,6 +421,15 @@ struct ConfigDef MuttVars[] = {
   ** keyring and sqlite database.  See ``$autocryptdoc'' for more details.
   ** (Autocrypt only)
   */
+  { "autocrypt_reply", DT_BOOL, &C_AutocryptReply, true },
+  /*
+  ** .pp
+  ** When \fIset\fP, replying to an autocrypt email automatically
+  ** enables autocrypt in the reply.  You may want to unset this if you're using
+  ** the same key for autocrypt as normal web-of-trust, so that autocrypt
+  ** isn't forced on for all encrypted replies.
+  ** (Autocrypt only)
+  */
 #endif
   { "autoedit", DT_BOOL, &C_Autoedit, false },
   /*
diff --git a/send.c b/send.c
index 495492685ab84d6a432bb6fc6c4d05985e5633b7..a2d5563a6b4217ec9227b454d3ee1174f2c2f161 100644 (file)
--- a/send.c
+++ b/send.c
@@ -2248,7 +2248,7 @@ int ci_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile
   {
     if (
 #ifdef USE_AUTOCRYPT
-        C_Autocrypt
+        C_Autocrypt && C_AutocryptReply
 #else
         0
 #endif