mblaze

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

commit e7969bf0545363e0cb8f0ef8e8d8829bbc5820bd
parent 311232d244b77b3ad9ce9d23564580d0af7730d4
Author: Christian Neukirchen <chneukirchen@gmail.com>
Date:   Mon,  1 Aug 2016 17:45:59 +0200

mcomp: support Attach: header

Diffstat:
mcomp | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/mcomp b/mcomp @@ -20,7 +20,7 @@ if [ -z "$outbox" ]; then i=$((i+1)) done draft="snd.$i" - draftmime="snd.$i.mime" + draftmime="./snd.$i.mime" else draft="$(true | mdeliver -v -XD "$outbox")" if [ -z "$draft" ]; then @@ -130,8 +130,15 @@ while :; do exit 1 ;; m|mime) - mmime <$draft >$draftmime - mshow -t ./$draftmime + ( + IFS=' +' + msed '/attach/d' $draft + for f in $(mhdr -M -h attach $draft); do + echo "#$(file -Lbi $f | sed 's/ //g') $f" + done + ) | tee /tmp/v | mmime >$draftmime + mshow -t $draftmime c= ;; e|edit)