aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-08-08 14:01:33 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-08-08 14:01:33 +0200
commit0f74f4d06256ffff526b91d7ef5627ff7f0e445b (patch)
treeb8e245d8a82b532e8aa0949ef76dc0392c757050
parent2a72a341c0444ecf24c9bbb85d7b06636fef2875 (diff)
downloadmblaze-0f74f4d06256ffff526b91d7ef5627ff7f0e445b.tar.gz
mrepl: check message has a message-id
-rwxr-xr-xmcomp15
1 files changed, 9 insertions, 6 deletions
diff --git a/mcomp b/mcomp
index 6fdb433..7c609ae 100755
--- a/mcomp
+++ b/mcomp
@@ -67,12 +67,15 @@ fi
done
echo "Subject: Re: $s"
cat ~/.mblaze/headers 2>/dev/null
- echo -n "References:"
- {
- mhdr -h references "$1"
- mhdr -h message-id "$1"
- } | reffmt
- echo "In-Reply-To: $(mhdr -h message-id "$1")"
+ mid=$(mhdr -h message-id "$1")
+ if [ "$mid" ]; then
+ echo -n "References:"
+ {
+ mhdr -h references "$1"
+ printf "%s\n" "$mid"
+ } | reffmt
+ echo "In-Reply-To: $mid"
+ fi
msgid
echo