mblaze

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

commit 7b5055f7abf4ac3617dacc64bd32e08268d7b709
parent b9f09fc581b50114938ac542dd87bf2457664c58
Author: Ivy Foster <ivy.foster@gmail.com>
Date:   Sat,  3 Sep 2016 17:56:12 -0500

mcom: allow user to specify sendmail, sendmail-args in $MBLAZE/profile

Closes: #6 [via git-merge-pr]

Diffstat:
mcom | 13+++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/mcom b/mcom @@ -19,6 +19,11 @@ msgdate() { } MBLAZE=${MBLAZE:-$HOME/.mblaze} + +sendmail=$(mhdr -h sendmail "$MBLAZE/profile") +sendmail_args=$(mhdr -h sendmail-args "$MBLAZE/profile") +sendmail="${sendmail:-sendmail} ${sendmail_args:--t}" + outbox=$(mhdr -h outbox "$MBLAZE/profile") if [ -z "$outbox" ]; then i=0 @@ -96,7 +101,7 @@ while :; do s|send) if [ -e $draftmime ]; then if [ $draft -ot $draftmime ]; then - if sendmail -t <$draftmime; then + if $sendmail <$draftmime; then if [ "$outbox" ]; then mv $draftmime $draft mflag -d $draft @@ -105,7 +110,7 @@ while :; do fi exit 0 else - echo "mcom: sendmail failed, kept draft $draft" + echo "mcom: $sendmail failed, kept draft $draft" exit 2 fi else @@ -114,7 +119,7 @@ while :; do fi else if mmime -c <$draft; then - if sendmail -t <$draft; then + if $sendmail <$draft; then if [ "$outbox" ]; then mflag -d $draft else @@ -122,7 +127,7 @@ while :; do fi exit 0 else - echo "mcom: sendmail failed, kept draft $draft" + echo "mcom: $sendmail failed, kept draft $draft" exit 2 fi else