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

Re: How can I know if error happens when sending mail?



Hi Markus,

Thanks for the method you provided. In fact I thought of that too. But still 
it's not efficient to watch that log file everytime after sending a mail. 
Logwatch should work but still I wonder if there is any easier way to do this 
job. Could we possible wrap msmtp in a shell script, and in the script call 
pass all parameters to msmtp and watch consequential results? Have anybody done 
that?

Thanks
Lars

On Mon, 01 Jun 2009, Markus Maria Miedaner wrote:

> 
> > Hi,
> > 
> > I'm using msmtp to send mail. I've set sendmail_wait=-1 in .muttrc to make 
> > sending mail not blocking. But there comes a problem. If any error happens 
> > when sending mail, I will not aware about it. And sometimes it cause 
> > trouble to my work. How can I solve this problem? I need to be told if 
> > error happens in sending mail. 
> > 
> > Thanks
> > Lars
> > 
> Ciao Lars,
> 
> you can specify a log_file for msmtp by adding the following to each 
> account_setting in your .msmtprc
> 
> logfile ~/msmtp.log
> 
> all you need to do then is to watch the file after sending an email. it may 
> take a few seconds before the logentries are written for each mail.
> for notification you could add a logwatcher to automate this process.
> 
> cheers,
> markus
> 
> _______________________________________________________________________
> Nur bis 31.05.: WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate
> und Telefonanschluss f?r 17,95 Euro/mtl.! http://produkte.web.de/go/02/
> 



----- End forwarded message -----