** .pp
** Also see the $$postpone variable.
*/
+ { "postpone_encrypt", DT_BOOL, R_NONE, OPTPOSTPONEENCRYPT, 0 },
+ /*
+ ** .pp
+ ** When \fIset\fP, postponed messages that are marked for encryption will be
+ ** encrypted using the key in $$postpone_encrypt_as before saving.
+ ** (Crypto only)
+ */
+ { "postpone_encrypt_as", DT_STR, R_NONE, UL &PostponeEncryptAs, 0 },
+ /*
+ ** .pp
+ ** This is the key used to encrypt postponed messages. It should be in
+ ** keyid form (e.g. 0x00112233 for PGP or the hash-value that OpenSSL
+ ** generates for S/MIME).
+ ** (Crypto only)
+ */
#ifdef USE_SOCKET
{ "preconnect", DT_STR, R_NONE, UL &Preconnect, UL 0},
/*
if (msg->content->next)
msg->content = mutt_make_multipart (msg->content);
+ if (WithCrypto && option (OPTPOSTPONEENCRYPT) && PostponeEncryptAs
+ && (msg->security & ENCRYPT))
+ {
+ int is_signed = msg->security & SIGN;
+ if (is_signed)
+ msg->security &= ~SIGN;
+
+ pgpkeylist = safe_strdup (PostponeEncryptAs);
+ if (mutt_protect (msg, pgpkeylist) == -1)
+ {
+ if (is_signed)
+ msg->security |= SIGN;
+ FREE (&pgpkeylist);
+ msg->content = mutt_remove_multipart (msg->content);
+ goto main_loop;
+ }
+
+ if (is_signed)
+ msg->security |= SIGN;
+ FREE (&pgpkeylist);
+ }
+
/*
* make sure the message is written to the right part of a maildir
* postponed folder.