[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] mts.conf has me Baffled.

From: Bob Carragher
Subject: Re: [Nmh-workers] mts.conf has me Baffled.
Date: Mon, 27 Jul 2015 21:44:40 -0700

[De-lurking, if only to show my lack of Bash chops. B-]

On Mon, 27 Jul 2015 22:35:33 -0400 Ken Hornstein <address@hidden> sez:

> >If the goal is to make nmh behave more like popular MUAs, and
> >work independently of a properly configured MTA then,
> >shouldn't nmh also have a queue?
> Well, it's not clear if they all do.  It's hard to have a
> independent queue in the MH command model, since MH/nmh aren't
> monolithic; how would you do that?  But like I said, if you
> have a draft folder doing a queue would actually be very
> simple.  Just create message drafts as usual and use something
> like this to send them (untested):
> #!/bin/sh
> DRAFTS=$(MHCONTEXT=/dev/null scan +drafts 2>/dev/null)
> if [ "$DRAFTS" ]; then
>       for message in $DRAFTS
>       do
>               send -draftfolder +drafts $message
>       done
> fi

I have long used something like this.  I have a "Pending" folder
where I store ready-to-be-sent messages -- that is my queue --
and invoke a script that sends them out one at a time.  (I used
to first copy each message to Mail/draft and then use "comp -use"
to send, before the kind folks on this ML, including Ken, taught
me about send(1).)

I still use this script, for when I don't have network access.

The one thing my script doesn't have access to is whether the
message posting was successful -- at least in the sense of
whether send (or comp, before it) thinks it completed
successfully.  I don't believe either provides a return value
that Bash could use.  And so I've had to save the output
generated by the script and eyeball it after-the-fact, and if
something failed then manually resend.

But I don't consider that too great an imposition.  Yes, sendmail
has automatic retry, but if it fails after all those retries then
it sends a failure message to you.  That's not that much more
useful unless you've gone to the trouble of writing a script that
is applied to all incoming email, determines whether a message is
just such a failure message, and then grabs the failed message
(assuming it's still available) and tries resending it.  In other
words, most likely you still need to check your email to see if a
message failed to be sent, and then manually resend it yourself.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]