<<< Date Index >>>     <<< Thread Index >>>

Re: set sendmail_wait=-1, what happens on failure?



Chris Green wrote:
> I have the following in my muttrc:-
> 
> set sendmail="/proj/chris/bin/ssh -l chris <somewhere> /usr/lib/sendmail -oem 
> -oi"
> set sendmail_wait=-1
> 
> So, what happens when the <somewhere> system is unreachable?

I think if it were me that instead of asking that question I would
create a script, say ~/bin/mysendmail, and I would set mutt's sendmail
to that script.  I would not do anything with sendmail_wait and just
let it run normally.

Now in that script you have complete control.  You can trap errors and
handle them as you see fit.  You can save the output to a file or
whatever you feel is useful.  If the ssh failed then keep the mail in
a spool and keep retrying.  You can retry previous messages whenever
there is a new message.  Lots of possibilities.

What I do is set mutt's sendmail to my own sendmail-offline script to
spool messages in an outgoing directory.  Then when I connect to the
internet I rsync those from my laptop to my mail relay and inject them
into the sendmail there.  My own process is rather a hack and not
suitable for sharing.  But perhaps it will give you ideas.

Bob