From 3ea0c9c35588464c9a529a727ba281325b08e6fa Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 23 May 2020 15:41:59 +0200 Subject: mrep: don't add another From: when -from is used already Fixes #176. --- mcom | 7 +++++-- 1 file 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:' -- cgit 1.4.1