diff options
author | Leah Neukirchen <leah@vuxu.org> | 2021-06-18 01:04:02 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2021-06-18 01:13:03 +0200 |
commit | 5c7432aa7b887bdf427f7f5043a6ba3ed0aac7ce (patch) | |
tree | bdabc14bfa79cc7b7d1707f1e0eb36c8ba235256 /mcom | |
parent | 4f1f0ea2b3193fb3b2f9222b1e71301c2aabc8a6 (diff) | |
download | mblaze-5c7432aa7b887bdf427f7f5043a6ba3ed0aac7ce.tar.gz mblaze-5c7432aa7b887bdf427f7f5043a6ba3ed0aac7ce.tar.xz mblaze-5c7432aa7b887bdf427f7f5043a6ba3ed0aac7ce.zip |
mcom: use mhdr -d -A even when extracting From: headers
We only want to decode the display part of the addresses only. Mails with a From: like From: "Non-ASCII Lastname, Firstname" <mail@example.org> resulted in To: lines like To: Non-ASCII Lastname, Firstname <mail@example.org> which would send to two addresses. Use -A to ensure proper decoding and quoting, even if its just a single address in From.
Diffstat (limited to 'mcom')
-rwxr-xr-x | mcom | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mcom b/mcom index 057a998..4c1027f 100755 --- a/mcom +++ b/mcom @@ -312,7 +312,7 @@ fi IFS=$NL for f in $(mseq -r "$@"); do printf '%s Forwarded message from %s %s\n\n' \ - $SEP "$(mhdr -d -h from "$f")" $SEP + $SEP "$(mhdr -d -A -h from "$f")" $SEP DISPLAY= mshow -n -N "$f" </dev/null | sed 's/^-/- &/' # RFC 934 printf '\n%s %s %s\n\n' \ @@ -355,7 +355,7 @@ fi printf 'Newsgroups: %s\n' "$ng" else to=$(mhdr -d -h reply-to "$1") - [ -z "$to" ] && to=$(mhdr -d -h from "$1") + [ -z "$to" ] && to=$(mhdr -d -A -h from "$1") printf 'To: %s\n' "$to" printf 'Cc: %s\n' \ "$(mhdr -d -A -h to:cc: "$1" | |