diff options
author | Florian Pritz <bluewind@xinu.at> | 2020-06-20 15:46:42 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2020-06-20 15:47:50 +0200 |
commit | 2191c0f53cfbc8012b9fa5a820fed3e3026f6cfd (patch) | |
tree | 5388e15b711c9c36ec8d2ac4059f4b5bb530d47d | |
parent | 029715489edf162d8df0ee27f2570730243b7a40 (diff) | |
download | bin-2191c0f53cfbc8012b9fa5a820fed3e3026f6cfd.tar.gz bin-2191c0f53cfbc8012b9fa5a820fed3e3026f6cfd.tar.xz |
masterkey.pl: Attach copy of signed key
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | masterkey.pl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/masterkey.pl b/masterkey.pl index d532dfb..fe9b7d6 100755 --- a/masterkey.pl +++ b/masterkey.pl @@ -67,6 +67,8 @@ on behalf of {$sender_name} ({$sender_key}) Your GPG key ({$recipient_key}) has been successfully signed by an Arch Linux master key. +A copy of your signed key is attached to this message. + Best Regards, SAMKIVS (Simple Automated Master Key Identity Verification System) on behalf of {$sender_name} ({$sender_key}) @@ -203,6 +205,16 @@ fun build_email($command, $sender_key, $sender_address_regex, $recipient_key, $r Data => [$body], ); + if ($command eq 'confirmation') { + my $recipient_key_data = `gpg --armor --export $recipient_key`; + $msg->attach( + Data => $recipient_key_data, + Filename => "$recipient_key-signed.asc", + Encoding => 'quoted-printable', + ); + } + + $msg->add("Message-ID", Email::MessageID->new->in_brackets); $msg->replace("Return-Path", "<$sender_addr>"); |