mrep: don't add another From: when -from is used already

Fixes #176.
pull/177/head
Leah Neukirchen 4 years ago
parent 17fe13a95f
commit 3ea0c9c355

@ -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:'

Loading…
Cancel
Save