diff options
Diffstat (limited to 'mcom')
-rwxr-xr-x | mcom | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/mcom b/mcom index fb7ec8d..0603cee 100755 --- a/mcom +++ b/mcom @@ -143,6 +143,14 @@ fi done ) fi ;; + *mbnc*) + printf '%s: \n' Resent-To + from=$(mhdr -h local-mailbox "$MBLAZE/profile") + [ "$from" ] && printf 'Resent-From: %s\n' "$from" + msgid | sed 's/^/Resent-/' + printf 'Resent-Date: %s\n' "$(mdate)" + mseq "${@:-.}" | xargs -d'\n' cat + ;; *mrep*) [ "$#" -eq 0 ] && set -- . ng=$(mhdr -h newsgroups "$1") @@ -178,16 +186,20 @@ fi ;; esac - if [ -f "$MBLAZE/signature" ]; then - SIGNATURE="$MBLAZE/signature" - elif [ -f ~/.signature ]; then - SIGNATURE="$HOME/.signature" - fi + case "$0" in + *mbnc*) ;; + *) + if [ -f "$MBLAZE/signature" ]; then + SIGNATURE="$MBLAZE/signature" + elif [ -f ~/.signature ]; then + SIGNATURE="$HOME/.signature" + fi - if [ -n "$SIGNATURE" ]; then - printf '%s\n' '-- ' - cat "$SIGNATURE" - fi + if [ -n "$SIGNATURE" ]; then + printf '%s\n' '-- ' + cat "$SIGNATURE" + fi + esac } >$draft automime= @@ -200,6 +212,14 @@ while :; do *.*) sendmail="mblow";; esac + resent="$(maddr -h resent-to "$draft")" + case "$resent" in + ?*) + sendmail=$(mhdr -h sendmail "$MBLAZE/profile") + sendmail="${sendmail:-sendmail} -- $resent" + ;; + esac + if [ -e $draftmime ]; then if [ $draft -ot $draftmime ] || [ "$automime" -eq 1 ]; then stampdate $draftmime |