X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhsign.sh;h=17b7489394267a24d1d9e29a60d535b2845f5113;hp=038052b368c7212f30543c6ddccdeea7d87ee601;hb=bd02210b2be64956a952f925a2dcd35fb42f6136;hpb=a8984c0e490cda653615bc0e1d4743ad8fe7a2a7 diff --git a/uip/mhsign.sh b/uip/mhsign.sh index 038052b..17b7489 100755 --- a/uip/mhsign.sh +++ b/uip/mhsign.sh @@ -108,14 +108,17 @@ lookupkeys() { echo "Encryption is not supported for BCCs" >&2 return 1 fi - - for i in `whom -ali -tocc -nobcc "$1"` ; do + + whom -ali -tocc -nobcc "$1" | while read i ; do case "$i" in '|'*) echo "Ignoring pipe address" >&2 continue ;; *@*) ;; - *) i="$i@`hostname -f`" ;; + *) a="$i@`hostname -f`" ;; esac + # extract the actual address + format='%<{error}%{error}: %{text}%|%(addr{text})%>' + i=`%libdir%/ap -form "=$format" "$i"` if k=`lookupkeyfile "$i"` ; then KL="$KL $k" elif k=`lookupkeyring "$i"` ; then