From 8bd0bc89bf88d69452476cead0a1b45a3c977aae Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 10 Mar 2017 11:18:18 +0100 Subject: MIME stimmt nun (besser) --- sendmailadvanced.in | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sendmailadvanced.in b/sendmailadvanced.in index db638fa..5c512bf 100755 --- a/sendmailadvanced.in +++ b/sendmailadvanced.in @@ -174,6 +174,8 @@ fi ( IFS='' adressatenString="" + contentType='Content-Type: text/plain; charset=utf-8' + contentTE='Content-Transfer-Encoding: 7bit' unset adressaten declare -A adressaten adressatenSammeln=false @@ -194,7 +196,17 @@ fi ${adressatenSammeln} && adressatenString="${adressatenString}${s}" if ${encrypt} then - if [ "${zeile:0:14}" == "Content-Type: " ] || [ "${zeile:0:14}" == "MIME-Version: " ] + if [ "${zeile:0:14}" == "Content-Type: " ] + then + contentType="${zeile}" + continue + fi + if [ "${zeile:0:27}" == "Content-Transfer-Encoding: " ] + then + contentTE="${zeile}" + continue + fi + if [ "${zeile:0:14}" == "MIME-Version: " ] then continue fi @@ -218,7 +230,14 @@ fi ) | \ if ${encrypt} then - gpg -e -a -s $(gpgAdressaten | sed 's| $||') + ( + echo "${contentType}" + echo "${contentTE}" + echo '' + cat + echo '' + ) | \ + gpg -e -a -s $(gpgAdressaten | sed 's| $||') else cat fi -- cgit v1.2.3-54-g00ecf