diff options
Diffstat (limited to 'sendmailadvanced.in')
-rwxr-xr-x | sendmailadvanced.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sendmailadvanced.in b/sendmailadvanced.in index 3c12fe8..b7aa435 100755 --- a/sendmailadvanced.in +++ b/sendmailadvanced.in @@ -63,7 +63,7 @@ gpgAdressaten() { then echo -n "-r ${adressat} " else - echo -n "-r ${gpg_recipient} " + printf -- '-r %s ' "${gpg_recipients[@]}" fi done } @@ -102,7 +102,10 @@ else done fi -gpg --list-keys "${gpg_recipient}" &> /dev/null || encrypt=false +[ -z "${gpg_recipients[*]}" ] && encrypt=false +for gpg_recipient in "${gpg_recipients[@]}"; do + gpg --list-keys "${gpg_recipient}" &> /dev/null || encrypt=false +done which hashcash &> /dev/null || stamp=false eval set -- "$(getopt -o eh:i:st --long encrypt,no-encrypt,hook:,help,inline:,no-inline,stamp,no-stamp,version -n "$(basename "$0")" -- "$@" || echo verwendung)" |