X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=caff%2Fcaff;h=ae922cd96d2f2e7020ba7f1bfe69f0740a8d0d0c;hb=ffeb72b98d41f9928a59792366e88146e4d8541a;hp=1fad0cabfea82c207e75dabaa2052e1747008a24;hpb=5fba3828be118c850ee38edc663c57c11fc5b451;p=pgp-tools.git diff --git a/caff/caff b/caff/caff index 1fad0ca..ae922cd 100755 --- a/caff/caff +++ b/caff/caff @@ -3,7 +3,7 @@ # caff -- CA - Fire and Forget # $Id$ # -# Copyright (c) 2004, 2005 Peter Palfrader +# Copyright (c) 2004, 2005, 2006 Peter Palfrader # Copyright (c) 2005, 2006 Christoph Berg # # All rights reserved. @@ -116,9 +116,9 @@ The file is generated when it does not exist. Example: - $CONFIG{owner} = q{Peter Palfrader}; - $CONFIG{email} = q{peter@palfrader.org}; - $CONFIG{keyid} = [ qw{DE7AAF6E94C09C7F 62AF4031C82E0039} ]; + $CONFIG{'owner'} = q{Peter Palfrader}; + $CONFIG{'email'} = q{peter@palfrader.org}; + $CONFIG{'keyid'} = [ qw{DE7AAF6E94C09C7F 62AF4031C82E0039} ]; =head2 Required basic settings @@ -171,7 +171,8 @@ Additional keyids to encrypt messages to. Default: none. =item B [string] -Additional arguments to pass to gpg. Default: none. +Additional commands to pass to gpg after the "sign" command. +Default: none. =head2 Keyserver settings @@ -218,7 +219,7 @@ Do not prompt for sending mail, just do it. Default: B<0>. =item B [boolean] Do not prompt for sending mail. The messages are still written to -$CONFIG{caffhome}/keys/. Default: B<0>. +$CONFIG{'caffhome'}/keys/. Default: B<0>. =item B [string] @@ -256,11 +257,11 @@ Default: none. Parameters to pass to Mail::Mailer. This could for example be - $CONFIG{mailer-send} = [ 'smtp', Server => 'mail.server', Auth => ['user', 'pass'] ] + $CONFIG{'mailer-send'} = [ 'smtp', Server => 'mail.server', Auth => ['user', 'pass'] ]; to use the perl SMTP client or - $CONFIG{mailer-send} = [ 'sendmail', '-o8' ] + $CONFIG{'mailer-send'} = [ 'sendmail', '-o8' ]; to pass arguments to the sendmail program. For more information run C<< perldoc Mail::Mailer >>. @@ -297,6 +298,7 @@ use File::Path; use File::Temp qw{tempdir}; use Text::Template; use MIME::Entity; +use Encode; use Fcntl; use IO::Select; use Getopt::Long; @@ -800,7 +802,7 @@ sub send_mail($$$@) { $message_entity->head->add("Subject", "Your signed PGP key 0x$key_id"); $message_entity->head->add("To", $address); - $message_entity->head->add("From", '"'.$CONFIG{'owner'}.'" <'.$CONFIG{'email'}.'>'); + $message_entity->head->add("From", '"'.Encode::encode('MIME-Q', $CONFIG{'owner'}).'" <'.$CONFIG{'email'}.'>'); $message_entity->head->add("Reply-To", $CONFIG{'reply-to'}) if defined $CONFIG{'reply-to'}; $message_entity->head->add("Bcc", $CONFIG{'bcc'}) if defined $CONFIG{'bcc'}; $message_entity->head->add("User-Agent", $USER_AGENT); @@ -907,8 +909,9 @@ $CONFIG{'mail'} = $params->{'mail'} if defined $params->{'mail'}; $CONFIG{'no-sign'} = $params->{'no-sign'} if defined $params->{'no-sign'}; push @{$CONFIG{'key-files'}}, @{$params->{'key-files'}} if defined $params->{'key-files'}; -for my $keyid (@ARGV) { +for my $keyid (map { split /\n/ } @ARGV) { # caff "`cat txt`" is a single argument $keyid =~ s/^0x//i; + $keyid =~ s/ //g; # gpg --fingerprint includes spaces if ($keyid =~ /^[A-F0-9]{32}$/i) { info("Ignoring v3 fingerprint $keyid. v3 keys are obsolete."); next;