mblaze

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

commit cd255e0bc65642975b8dcc02fe7b4e5215a60c18
parent f7052abc8b0aff3abdb4d0ae6d53ddd1afe3e0d1
Author: Christian Neukirchen <chneukirchen@gmail.com>
Date:   Sun, 25 Sep 2016 21:30:20 +0200

mcom: very elementary NNTP posting support

Diffstat:
mcom | 22+++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/mcom b/mcom @@ -59,12 +59,19 @@ fi ;; *mrep*) [ "$#" -eq 0 ] && set -- . - to=$(mhdr -h reply-to "$1") - [ -z "$to" ] && to=$(mhdr -h from "$1") - echo "To: $to" - echo "Cc: $(mhdr -d -A -h to:cc: "$1" | commajoin)" - echo "Bcc: " + ng=$(mhdr -h newsgroups "$1") + if [ "$ng" ]; then + echo "Newsgroups: $ng" + else + to=$(mhdr -h reply-to "$1") + [ -z "$to" ] && to=$(mhdr -h from "$1") + echo "To: $to" + echo "Cc: $(mhdr -d -A -h to:cc: "$1" | commajoin)" + echo "Bcc: " + fi echo "Subject: Re: $(mscan -f '%S' "$1")" + from=$(mhdr -h local-mailbox "$MBLAZE/profile") + [ "$from" ] && echo "From: $from" cat "$MBLAZE/headers" 2>/dev/null mid=$(mhdr -h message-id "$1") if [ "$mid" ]; then @@ -99,6 +106,11 @@ c=e while :; do case "$c" in s|send) + case "$(mhdr -h newsgroups "$draft")" in + *gmane.*) sendmail="mblow -s news.gmane.org";; + *.*) sendmail="mblow";; + esac + if [ -e $draftmime ]; then if [ $draft -ot $draftmime ]; then if $sendmail <$draftmime; then