Avoid use of error msg class "IPM.Note.GpgOL"
authorAndre Heinecke <aheinecke@intevation.de>
Mon, 26 Nov 2018 13:15:45 +0000 (14:15 +0100)
committerAndre Heinecke <aheinecke@intevation.de>
Mon, 26 Nov 2018 13:38:25 +0000 (14:38 +0100)
* src/mapihelp.cpp (change_message_class_ipm_note_secure_cex),
(change_message_class_ipm_note_smime): Use OpaqueEncrypted
rather then IPM.Note.GpgOL.
(mapi_change_message_class): Change old IPM.Note.GpgOL mails.

--
This should help debugging
GnuPG-Bug-Id: T4267

And in any case IPM.Note.GpgOL should never be used as
we do not handle it in decryption.

src/mapihelp.cpp

index 4a1d532..3949ea3 100644 (file)
@@ -1248,7 +1248,7 @@ change_message_class_ipm_note_smime (LPMESSAGE message)
 
   /* If we did not found anything but let's change the class anyway.  */
   if (!newvalue && opt.enable_smime)
-    newvalue = xstrdup ("IPM.Note.GpgOL");
+    newvalue = xstrdup ("IPM.Note.GpgOL.OpaqueEncrypted");
 
   TRETURN newvalue;
 }
@@ -1412,7 +1412,7 @@ change_message_class_ipm_note_secure_cex (LPMESSAGE message, int is_cexenc)
     }
 
   if (!newvalue)
-    newvalue = xstrdup ("IPM.Note.GpgOL");
+    newvalue = xstrdup ("IPM.Note.GpgOL.OpaqueEncrypted");
 
   TRETURN newvalue;
 }
@@ -1528,7 +1528,8 @@ mapi_change_message_class (LPMESSAGE message, int sync_override,
         {
           newvalue = change_message_class_ipm_note (message);
         }
-      else if (opt.enable_smime && !strcmp (s, "IPM.Note.SMIME"))
+      else if (opt.enable_smime && (!strcmp (s, "IPM.Note.SMIME") ||
+                                    !strcmp (s, "IPM.Note.GpgOL")))
         {
           newvalue = change_message_class_ipm_note_smime (message);
         }