Hi Alexander,

The enclosed patch should fix the problem.

I have tried different kind of configurations using

 - the $CONFIG{'no-email'} variable,
 - the $CONFIG{'mail'} variable,
 - the mail command line option

and it looks like everything works fine.

If you can give it a quick try, that would be great.

Thanks,

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/
diff --git a/caff/caff b/caff/caff
index 5b5375b..b32b2b1 100755
--- a/caff/caff
+++ b/caff/caff
@@ -933,19 +933,18 @@ $CONFIG{'local-user'}  = $params->{'local-user'}  if defined $params->{'local-us
 $CONFIG{'no-download'} = $params->{'no-download'} if defined $params->{'no-download'};
 $CONFIG{'no-sign'}     = $params->{'no-sign'}     if defined $params->{'no-sign'};
 
+$CONFIG{'no-mail'}     = $params->{'no-mail'}     if defined $params->{'no-mail'};
+$CONFIG{'mail'}        = $params->{'mail'}        if defined $params->{'mail'};
+
 # If old 'no-mail' parameter, or if the 'mail' parameter is set to 'no'
-if ( $CONFIG{'no-mail'} || defined $params->{'no-mail'} ||
-	( defined $params->{'mail'} && $params->{'mail'}  eq 'no' ) ) {
+if ( defined $CONFIG{'no-mail'} ||
+     ( defined $CONFIG{'mail'} && $CONFIG{'mail'}  eq 'no' ) ) {
 	$CONFIG{'mail'} = 'no';
-} elsif ( defined $params->{'mail'} ) {
-	$CONFIG{'mail'} = $params->{'mail'};
-} else {
+
+} elsif ( !defined $CONFIG{'mail'} ) {
 	$CONFIG{'mail'} = 'ask-yes';
 }
 
-$CONFIG{'no-mail'}     = $params->{'no-mail'}     if defined $params->{'no-mail'};
-$CONFIG{'mail'}        = $params->{'mail'}        if defined $params->{'mail'};
-
 push @{$CONFIG{'key-files'}}, @{$params->{'key-files'}} if defined $params->{'key-files'};
 
 for my $keyid (map { split /\n/ } @ARGV) { # caff "`cat txt`" is a single argument

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to