summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-03-12 12:57:06 +0100
committerErich Eckner <git@eckner.net>2020-03-12 12:57:06 +0100
commit0dabb5cb4ec8c6252f869f0ae1184ad3c6f95451 (patch)
tree9a7b90220299780ee40615c4c821fee763338603
parent428f0024cb729279c7058b32cf69b38cd640fe45 (diff)
downloadsendmailadvanced-0dabb5cb4ec8c6252f869f0ae1184ad3c6f95451.tar.xz
sendmailadvanced: only consider keys which are suitable for encryption for encryption
-rwxr-xr-xsendmailadvanced.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/sendmailadvanced.in b/sendmailadvanced.in
index 4afcf05..e61a896 100755
--- a/sendmailadvanced.in
+++ b/sendmailadvanced.in
@@ -48,6 +48,9 @@ gpgAdressaten() {
if \
(
gpg --with-colons --list-public-keys "${adressat}" 2> /dev/null | \
+ sed -n '
+ /^pub\(:[^:]*\)\{10\}:[^:]*E[^:]*:/,/^tru:/ p
+ ' | \
grep '^uid:[mfuw]:' | \
cut -d: -f10 | \
tr '<>' '\n' | \