Hi,

you can use for example the "exec" action to post the mail to the queue directly, something like this:

  check host myhost ...
    if failed port 8000 then exec "/bin/mail -s alert [EMAIL PROTECTED]"

You can use your custom script to perform whatever action you want - monit sets the environment variables which describe what happened and can be used for custom action. See monit manual for details.

Martin



Andrew Lusk wrote:
Looking at the source, it doesn't look like this is possible, but I wanted to make sure, or see if anyone else had this issue.

I want monit to send email, but I can't run a local SMTP server or have it send to a remote one (long story). What I want is for monit to deliver straight to /var/spool/mail/<user>. This isn't a really hard modification to the source (basically rewriting "int sendmail(Mail_T)" in sendmail.c) but I was wondering if there was some more elegant way.

Thanks
Andrew Lusk


------------------------------------------------------------------------

--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to