/var/log/maillog growing rather large

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: /var/log/maillog growing rather large

Post by jbennett »

It looks like it's cleared up a number of the messages in my maillog file. I'm just getting one now that I would like to resolve:

Code: Select all

Apr  9 13:29:24 nagiosserver sendmail[4660]: r39ITOrM004660: <[email protected]>... User unknown
Apr  9 13:29:24 nagiosserver sendmail[4659]: r39ITOkc004659: to=$, ctladdr=nagios (501/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30233, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
When I go down through the contacts list, I don't find any that are missing? Is this a setting somewhere that I've over looked?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: /var/log/maillog growing rather large

Post by abrist »

Do you use any custom notifications? It looks like it is trying to send an email to the user "$" which is usually a symptom of an incorrect custom notification.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: /var/log/maillog growing rather large

Post by jbennett »

abrist wrote:Do you use any custom notifications? It looks like it is trying to send an email to the user "$" which is usually a symptom of an incorrect custom notification.
There are some that I think the previous admin configured. I will lok through the commands to see if something is wrong.

As an example: If I have the following command: host-notify-by-email

Code: Select all

/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
I'm going to assume that I need to loook at the $CONTACTEMAIL$ section of that string and make sure there aren't any extra characters, correct?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: /var/log/maillog growing rather large

Post by abrist »

Yes. But unless major changes were made, most users make modifications or modified copies of the "xi_host_notification_handler" and "xi_service_notification_handler".
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked