mblaze

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

commit 07a60a3908c70e7504e57883d19512f78d42df28
parent 36faf7f1146d14e292edd03ee1edf139068e2f53
Author: Leah Neukirchen <leah@vuxu.org>
Date:   Sun,  9 Apr 2017 22:49:17 +0200

mrep: don't put our own addresses into Cc:

Closes #26.

Diffstat:
mcom | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/mcom b/mcom @@ -5,6 +5,11 @@ commajoin() { sed ':a;N;s/\n/, /;$!b a' } +notmine() { + mine="$(maddr -a -h local-mailbox:alternate-mailboxes: $MBLAZE/profile)" + grep -Fv -e "$mine" +} + reffmt() { sed 's/^[^<]*//g;s/[^>]*$//g;s/>[^<]*</>\n</g' | uniq | sed 's/^/ /' } @@ -63,7 +68,8 @@ fi to=$(mhdr -h reply-to "$1") [ -z "$to" ] && to=$(mhdr -h from "$1") printf 'To: %s\n' "$to" - printf 'Cc: %s\n' "$(mhdr -d -A -h to:cc: "$1" | commajoin)" + printf 'Cc: %s\n' \ + "$(mhdr -d -A -h to:cc: "$1" |notmine |commajoin)" printf 'Bcc: \n' fi printf 'Subject: Re: %s\n' "$(mscan -f '%S' "$1")"