Page 2 of 2

Re: /var/log/maillog growing rather large

Posted: Tue Apr 09, 2013 1:36 pm
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?

Re: /var/log/maillog growing rather large

Posted: Tue Apr 09, 2013 2:01 pm
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.

Re: /var/log/maillog growing rather large

Posted: Tue Apr 09, 2013 2:15 pm
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?

Re: /var/log/maillog growing rather large

Posted: Tue Apr 09, 2013 2:21 pm
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".