summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2018-12-23 16:32:52 -0800
committerKevin McCarthy <kevin@8t8.us>2018-12-25 13:52:03 -0800
commit66e0958411fb4477f51528921836f41a61075daf (patch)
tree6c8a9e0e7e9a1e91d89afd8d9751773a05e00a44 /main.c
parentf1431b15ce8762929cbbe7010d54fd48687b4c2a (diff)
Finish protected header write support.
Write out the protected headers when writing the mime header part. Hide protected subjects with $crypt_protected_headers_subject, for outgoing, postponed, and fcc'ed messages. Don't hide in postponed and fcc'ed if $crypt_protected_headers_read isn't set. Add a few missing cases where mime_headers needed to be cleaned up on error. Remove the protected headers for $fcc_clear.
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.c b/main.c
index 6f7b4a11..347521ea 100644
--- a/main.c
+++ b/main.c
@@ -1228,7 +1228,9 @@ int main (int argc, char **argv, char **environ)
}
mutt_write_rfc822_header (fout, msg->env, msg->content,
- MUTT_WRITE_HEADER_POSTPONE, 0);
+ MUTT_WRITE_HEADER_POSTPONE, 0,
+ option (OPTCRYPTPROTHDRSREAD) &&
+ mutt_should_hide_protected_subject (msg));
if (option (OPTRESUMEEDITEDDRAFTFILES))
fprintf (fout, "X-Mutt-Resume-Draft: 1\n");
fputc ('\n', fout);