Add X-Gpgit-Execute header to all messages encrypted with gpgit, so that it is easier to tell which messages have been sent encrypted and which messages were merely encrypted by gpgit

This commit is contained in:
Etienne Perot 2012-08-08 17:21:44 -04:00
parent 859edbe85d
commit a5816ef60e
1 changed files with 2 additions and 1 deletions

3
gpgit
View File

@ -124,7 +124,7 @@ use MIME::Parser;
## Keep the new message if it was succesfully flattened
if( $new_mime->mime_type !~ /^multipart\// ){
$new_mime->head->add('X-GPGIT-Flattened-From', $orig_mime_structure );
$new_mime->head->add('X-Gpgit-Flattened-From', $orig_mime_structure );
$mime = $new_mime;
}
}
@ -134,6 +134,7 @@ use MIME::Parser;
## Encrypt
{
my $code;
$mime->head->add('X-Gpgit-Executed', 'True' );
if( $encrypt_mode eq 'pgpmime' ){
$code = $gpg->mime_encrypt( $mime, @recipients );
} elsif( $encrypt_mode eq 'prefer-inline' ){