diff options
author | Erich Eckner <git@eckner.net> | 2017-03-10 11:18:18 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-03-10 11:18:18 +0100 |
commit | 8bd0bc89bf88d69452476cead0a1b45a3c977aae (patch) | |
tree | cc4f37dc1af7e25e40facc82fefa08910019cbe3 /sendmailadvanced.in | |
parent | 5bd55be64d33f5ce2562109612cc75b2e1f6ebe6 (diff) | |
download | sendmailadvanced-8bd0bc89bf88d69452476cead0a1b45a3c977aae.tar.xz |
MIME stimmt nun (besser)
Diffstat (limited to 'sendmailadvanced.in')
-rwxr-xr-x | sendmailadvanced.in | 23 |
1 files 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 |