command.cfg with qmail MTA

william f guyton jr wguyton at informs.com
Tue Jun 10 19:18:21 CEST 2003


error is : 

Error: Unexpected token or statement in file
'/usr/local/nagios/etc/command.cfg' on line 33.

On Tue, 2003-06-10 at 12:09, Skip Montanaro wrote:

>     william> Running the preflight check, with nagios v1.1, I get an error
>     william> from line 33 in command.cfg:
> 
> What's the error message ?
> 
>     william> Line 33 is:
> 
>     william> command[notify-by-email]=/bin/printf "$OUTPUT$" | /bin/mail -s
>     william> '$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTEMAIL$
> 
> Maybe you need /usr/bin/printf and /usr/bin/mail?
> 
>     william> I have qmail running on this host (RH v8), so my question is
>     william> what is the syntax for sending this notify to qmail. I have
>     william> tried /usr/sbin/sendmail -> /var/qmail/bin/sendmail, but then
>     william> it does not like the -s switch.
> 
> I really doubt you'll need to resort to calling qmail or sendmail to get
> this to work on a RedHat system.  You almost certainly have /bin/mail and
> /bin/printf (my Mac has both, but in /usr/bin) or can get them from an rpm.
> That would be easier than calling sendmail or qmail-faking-sendmail
> directly.  If you can't manage to find and/or install /bin/mail, note that
> sendmail expects an rfc-2?822 message on stdin.  As a first guess I'd try
> something like
> 
>     /bin/printf "To: $CONTACTEMAIL$\nSubject: $SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$\n\n$OUTPUT$" | /usr/sbin/sendmail -odb
> 
> but that's just a guess.  In any case, I doubt the preflight check is
> actually trying (and failing) to execute the /bin/mail and /bin/printf.  I
> suspect your problem lies elsewhere.

-- 
william f guyton jr
senior network engineer
informs
334.277.0372x133
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030610/970ba052/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030610/970ba052/attachment.sig>


More information about the Users mailing list