--On Wednesday, July 07, 2004 12:59 PM -0300 Dalpi <[EMAIL PROTECTED]> wrote:

Hello,

First of all I would like to thank the answer to my previous question
(different behavior for alerts).

Now, I'm facing a problem with mail.alert. Under "normal operation" it
works perfectly, but when the network is down the alert gets locked
(probably trying to resolve the destination name).

I was looking at the source code of the alert and noticed that it uses
sendmail as the application which sends the alert. Does anyone know how
can I set a timeout in sendmail command line to limit the time it keeps
on trying to send a message (and consequently locking mon)?

I found (searching at google) that I could just "queue" the message, but
then I would need a sendmail server running at the machine, which is not
desirable in my case.

Another possible solution would be the use of Net::SMTP, does anyone has
used it to build a mail.alert?



The only way to queue mail locally is to have a local MTA which will route the mail for you. Net::SMTP won't help.

Ultimately, any alert script which does something over the network may hang when the network is having problems.

The dev version of Mon in sourceforge no longer blocks when calling an alert. Hopefully Jim and I will get a 1.1 release candidate available sometime soon. In the meantime you can add timeout code to your alert script, run a local MTA and queue the mail, or try using the newer Mon from the sourceforge CVS repository.

-David



David Nolan                    <*>                    [EMAIL PROTECTED]
curses: May you be forced to grep the termcap of an unclean yacc while
     a herd of rogue emacs fsck your troff and vgrind your pathalias!


_______________________________________________ mon mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon

Reply via email to