[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[msmtp-users] Re: Wrapper for msmtp. Writes a mail to procmail on failure
I think you can have a system like the php program I have sent, inside msmtp itslef. You can just call whatever is their mail-sorting agent with a message and the error message. Tracking the log files is very difficult task, especially if you are sending 50-60 mails every day. Just have a configuration that will allow users to have a program that will called in case of error (Most likely procmail).
If you have that you can confidently set the send-mail-wait option in mutt to -1, and the mutt will return instantly after executing msmtp. You don't need to bother whether the mail sent was successful or not, since you will get a neat message in your error-mesage mbox if mail sending fails.
thanks.
On Wed, Jul 27, 2005 at 12:14:28PM +0200, Martin Lambers wrote:
> On Wed, 27. Jul 2005, 12:32:26 +0530, Ligesh wrote:
> > Does msmtp have some trigger which will execute certain commands if
> > the mail send is not successful?
>
> No, you have to check the exit code. If you want to have a short summary
> of the failure/success status on stdout, you can use the option
> '--logfile=-' (the normal error messages are still printed to stderr in
> this case).
>
> You can also get more information about the error (if any) from the exit
> code itself: see your systems sysexits.h header file.