mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 0f74f4d06256ffff526b91d7ef5627ff7f0e445b
parent 2a72a341c0444ecf24c9bbb85d7b06636fef2875
Author: Christian Neukirchen <chneukirchen@gmail.com>
Date:   Mon,  8 Aug 2016 14:01:33 +0200

mrepl: check message has a message-id

Diffstat:
mcomp | 15+++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

diff --git 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