diff options
author | Leah Neukirchen <leah@vuxu.org> | 2020-05-23 15:41:59 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-05-23 15:41:59 +0200 |
commit | 3ea0c9c35588464c9a529a727ba281325b08e6fa (patch) | |
tree | 7ebb3b9e6de4107b46818d9ed8fb98d4482a88ff /mcom | |
parent | 17fe13a95feccd83c4900be1f603618d22f980ae (diff) | |
download | mblaze-3ea0c9c35588464c9a529a727ba281325b08e6fa.tar.gz mblaze-3ea0c9c35588464c9a529a727ba281325b08e6fa.tar.xz mblaze-3ea0c9c35588464c9a529a727ba281325b08e6fa.zip |
mrep: don't add another From: when -from is used already
Fixes #176.
Diffstat (limited to 'mcom')
-rwxr-xr-x | mcom | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mcom b/mcom index e2f7100..205a1ce 100755 --- a/mcom +++ b/mcom @@ -356,8 +356,11 @@ fi msed "/body/d" /dev/stdin fi | sed '/^$/d' printf 'Subject: Re: %s\n' "$(COLUMNS=10000 mscan -f '%S' "$1")" - from=$(mhdr -h local-mailbox "$MBLAZE/profile") - [ "$from" ] && printf 'From: %s\n' "$from" + if ! printf '%s\n' "$hdrs" | awk '{ print }' | + mhdr -h from: /dev/stdin >/dev/null; then + from=$(mhdr -h local-mailbox "$MBLAZE/profile") + [ "$from" ] && printf 'From: %s\n' "$from" + fi mid=$(mhdr -h message-id "$1") if [ "$mid" ]; then printf 'References:' |