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

Re: msmtp: retry sending failed messages



On Sat, Nov 18, 2006 at 10:49:49AM -0700, Bob Proulx wrote:
> Ismael Valladolid Torres wrote:
> > redondos escribe:
> > > Is there a way of using the return code of $sendmail and, if needed,
> > > retry sending a message that failed?
> > 
> > I suspect that return code of $sendmail has nothing to do with the
> > fact of the message have been succesfully sent. Having $sendmail
> > returning a correct value could only mean that the message's been put
> > to an output queue.
> 
> Agreed.
> 
> But for other general use it would seem that you could set $sendmail
> to a shell script that you write and have it pass the mail to
> sendmail.  The shell script could do special handling of the
> messages.  It would reconfigure your mailer depending upon interface
> data, etc.  You could probably handle whatever problem you are having
> there.

I came in late on this thread. Pardon is I'm off track.

Sendmail (the actual sendmail program) should return a fairly
informative exit status. These are found in sysexits.h, and a few of
note are: EX_OK (Successful completion on all addresses); EX_TEMPFAIL
(Message could not be sent immediately, but was queued).

-- 
Darrin Chandler            |  Phoenix BSD Users Group
dwchandler@xxxxxxxxxxxxx   |  http://bsd.phoenix.az.us/
http://www.stilyagin.com/  |