aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-04-09 22:49:17 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-04-09 22:49:17 +0200
commit07a60a3908c70e7504e57883d19512f78d42df28 (patch)
tree8bae4d9da32f6232afbe1163203eb04389747d82
parent36faf7f1146d14e292edd03ee1edf139068e2f53 (diff)
downloadmblaze-07a60a3908c70e7504e57883d19512f78d42df28.tar.gz
mrep: don't put our own addresses into Cc:
Closes #26.
-rwxr-xr-xmcom8
1 files changed, 7 insertions, 1 deletions
diff --git a/mcom b/mcom
index 9135621..3cfe028 100755
--- 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")"