[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: esmtp-run delivers mail from shell, but not from nagios

On 2012-02-11 15:30:52, Jesse Thompson wrote:
> I'm fairly sure I have isolated this problem as being related to
> esmtp-run and not directly related to nagios. Nagios takes a string
> and executes that via popen in order to send email notifications, and
> can execute any other arbitrary commands I try but not esmtp-run's
> simple email sender. Futhermore I've used nagios' debug log to confirm
> the command runs as expected, using the expected string (after macro
> expansions, etc) and that a zero return value is rendered from
> esmtp-run indicating no errors: yet no delivery happens either.

Not entirely sure how esmtp-run works in conjunction with 
executing sendmail, but you indeed verified the same command
works manually but does not work with nagios then see if
there is a different in the environment (`env`) between
working and non-working scenario.  When I have troubleshooted 
this in the past I would either change the nagios configuration 
to invoke a different test program, or temporarily replace the
default notify*by-email.

I know, for a fact, that NRPE does not set $HOME, and that causes 
problems for mysql when it tries to find its .my.cnf file.

Allan Wind
Life Integrity, LLC

Reply to: