Page 1 of 1

notifications not being sent

Posted: Mon Apr 07, 2014 1:17 am
by litsupport.box
Installed Version: 2012R2.9
Mail-method: SMTP
Host: smtp.mydomain.net
Port: 25
Hostname: mynagiosbox.mydomain.net
IP: 10.x.x.219
Recipient: [email protected]
Mailserver is accepting connections from 10.x.x.0/24
The Incident Management – Notifications dashboard tells that the notifications are sent.

uname -a
Linux mynagiosbox.mydomain.net 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13 00:26:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/*-release
CentOS release 6.4 (Final)

tail -10 /var/log/maillog
Apr 3 10:42:43 mynagiosbox postfix/error[15849]: 5BA2B1067: to=<[email protected]>, relay=none, delay=80294, delays=80294/0.01/0/0.03, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with mail.mydomain.com[10.x.x.x] while receiving the initial server greeting)
Apr 3 10:42:43 mynagiosbox postfix/error[15850]: 77BB92205: to=<[email protected]>, relay=none, delay=80164, delays=80164/0.01/0/0.03, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with mail.mydomain.com[10.x.x.x] while receiving the initial server greeting)
Apr 3 10:42:43 mynagiosbox postfix/error[15853]: 8BDD348B5: to=<[email protected]>, relay=none, delay=84254, delays=84254/0.02/0/0.02, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with mail.mydomain.com[10.x.x.x] while receiving the initial server greeting)
Apr 3 10:42:43 mynagiosbox postfix/error[15852]: 7E06C488D: to=<[email protected]>, relay=none, delay=84454, delays=84454/0.01/0/0.02, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with mail.mydomain.com[10.x.x.x] while receiving the initial server greeting)
Apr 3 10:47:43 mynagiosbox postfix/qmgr[1811]: 6AAA248D3: from=<[email protected]>, size=772, nrcpt=1 (queue active)
Apr 3 10:47:43 mynagiosbox postfix/qmgr[1811]: 8193C4A6E: from=<[email protected]>, size=780, nrcpt=1 (queue active)
Apr 3 10:47:43 mynagiosbox postfix/qmgr[1811]: 893C34A83: from=<[email protected]>, size=771, nrcpt=1 (queue active)
Apr 3 10:47:43 mynagiosbox postfix/smtp[20429]: 6AAA248D3: to=<[email protected]>, relay=mail.mydomain.com[10.x.x.x]:25, delay=84414, delays=84414/0.02/0.1/0, dsn=4.4.2, status=deferred (lost connection with mail.mydomain.com[10.x.x.x] while receiving the initial server greeting)
Apr 3 10:47:43 mynagiosbox postfix/smtp[20430]: 8193C4A6E: to=<[email protected]>, relay=mail.mydomain.com[10.x.x.x]:25, delay=88574, delays=88574/0.02/0.11/0, dsn=4.4.2, status=deferred (lost connection with mail.mydomain.com[10.x.x.x] while receiving the initial server greeting)
Apr 3 10:47:43 mynagiosbox postfix/smtp[20431]: 893C34A83: to=<[email protected]>, relay=mail.mydomain.com[10.x.x.x]:25, delay=88464, delays=88464/0.02/0.1/0, dsn=4.4.2, status=deferred (lost connection with mail.mydomain.com[10.x.x.x] while receiving the initial server greeting)

dig smtp.mydomain.net mx

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> smtp.mydomain.net mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26166
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;smtp.mydomain.net. IN MX

;; ANSWER SECTION:
smtp.mydomain.net. 900 IN CNAME mymailserver.mydomain.net.

;; Query time: 3 msec
;; SERVER: 10.x.x.187#53(10.x.x.187)
;; WHEN: Thu Apr 3 11:13:33 2014
;; MSG SIZE rcvd: 56


telnet smtp.mydomain.net 25
Trying 10.8.x.x...
Connected to smtp.mydomain.net.
Escape character is '^]'.
220 smtp.mydomain.net Microsoft ESMTP MAIL Service ready at Thu, 3 Apr 2014 09:18:06 +0000
helo mynagiosbox.mydomain.net
250 smtp.mydomain.net Hello [10.x.x.219]
mail from: [email protected]
250 2.1.0 Sender OK
rcpt to: [email protected]
250 2.1.5 Recipient OK
data
354 Start mail input; end with <CRLF>.<CRLF>
SUBJECT: testmail from telnet smtp.mydomain.net 25

Hi All,

This is a testmail.

BR,
NagiosXI.box
.
250 2.6.0 <[email protected]> [InternalId=8246566] Queued mail for delivery
quit
221 2.0.0 Service closing transmission channel
Connection closed by foreign host.


Above message is received correctly


Hope you can help

--edit-- anonymized

Re: notifications not being sent

Posted: Mon Apr 07, 2014 10:46 am
by abrist
Just a quick inquiry - Are you using smtp without any auth? As you can send an email from telnet without auth, I would presume that you need to disable auth in the XI mail settings interface.

EDIT: As the connection is successful, but bailing on the server message, you may find some helpful information in the logs on the mail server. If you have access to the mail server, take a look at those logs for any hints.

Re: notifications not being sent

Posted: Tue Apr 08, 2014 1:26 am
by litsupport.box
Yes, we use smtp without auth. The mailserver checks from which network the request comes from. In this case 10.x.x.0/24 This network is allowed to send mail without auth.
I did not set a username or passw in the mailsettings.
Unfortunately, we do not have direct access to the mailserver. These are on another site in another country. I'll ask the mail administrators to take a look at the log-files.

-- edit -- anonymized

Re: notifications not being sent

Posted: Tue Apr 08, 2014 8:51 am
by litsupport.box
There is some strange behaviour:
on the command host smtp.mydomain.net
smtp.mydomain.net is an alias for mailserver.mydomain.net.
mailserver.mydomain.net has address 10.8.x.x

but in the maillog it is displayed as mail.mymydomain.com[10.100.x.x]
The same server, but on another network.

This made me think it could be a proxy/gateway problem.

I've checked the enviroment and http_proxy is not set.
in /etc/wgetrc these settings are commented
in /etc/yum.conf the proxy setting are also commented out.
in the admin - proxy configuration, there's no proxy set.
but in the admin - system profile I see this :
Proxy appears to be in use

-- edit -- anonymized

Re: notifications not being sent

Posted: Tue Apr 08, 2014 10:33 am
by lmiltchev
Can you show us the profile page? (Admin->System Profile)

Re: notifications not being sent

Posted: Wed Apr 09, 2014 1:32 am
by litsupport.box
FYI, problem not getting mail is solved.
In the /etc/postfix/main.cf
set the relayhost to smtp.mydomain.net
AND added user myusername so this is no not only a contact, but also a user.

Still a strange behaviour with the proxy not set, but nagios states it is in use.

Hereby the system profile :
Nagios XI Installation Profile
Download Profile
System:
Nagios XI Version : 2012R2.9
mynagiosbox.mydomain.net 2.6.32-358.2.1.el6.x86_64 x86_64
CentOS release 6.4 (Final)
Gnome is not installed
Proxy appears to be in use
Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
Server Name: mynagiosbox
Server Address: 10.x.x.219
Server Port: 80
Date/Time
PHP Timezone: Europe/Amsterdam
PHP Time: Wed, 09 Apr 2014 08:16:53 +0200
System Time: Wed, 09 Apr 2014 08:16:53 +0200
Nagios XI Data
License ends in: TMMOQP

nagios (pid 11260) is running...
NPCD running (pid 1743).
ndo2db (pid 1809) is running...
CPU Load 15: 1.48
Total Hosts: 155
Total Services: 1389
Function 'get_base_uri' returns: http://mynagiosbox/nagiosxi/
Function 'get_base_url' returns: http://mynagiosbox/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://mynagiosbox/nagiosxi/includes/co ... rofile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
Ping Test localhost
Running:

/bin/ping -c 3 localhost 2>&1

PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.077 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.027 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.047 ms

--- localhost ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.027/0.050/0.077/0.021 ms
Test wget To locahost
WGET From URL: http://localhost/nagiosql/index.php
Running:

/usr/bin/wget http://localhost/nagiosql/index.php

--2014-04-09 08:16:55-- http://localhost/nagiosql/index.php
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: "/usr/local/nagiosxi/tmp/nagiosql_index.tmp"

0K ..... 100% 216M=0s

2014-04-09 08:16:55 (216 MB/s) - "/usr/local/nagiosxi/tmp/nagiosql_index.tmp" saved [5259/5259]

-- edit -- anonymized

Re: notifications not being sent

Posted: Wed Apr 09, 2014 9:35 am
by slansing
Interesting, and you have not made alterations to:

Code: Select all

/etc/wgetrc
and:

Code: Select all

/etc/yum.conf

Re: notifications not being sent

Posted: Thu Apr 10, 2014 3:33 am
by litsupport.box
Yes, because of the mail-issue I altered both files, they both had a proxy setting, but I commented these settings from both files, after which Nagios still says
Proxy appears to be in use

Re: notifications not being sent

Posted: Thu Apr 10, 2014 10:54 am
by lmiltchev
Can you post, both the "/etc/wgetrc" and the "/etc/yum.conf" files for review?

Re: notifications not being sent

Posted: Fri Apr 11, 2014 1:45 am
by litsupport.box
:oops: :roll:

Code: Select all

/etc/wgetrc

Code: Select all

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
#https_proxy=http://10.x.x.x:y/
#http_proxy=http://10.x.x.x:y/
#ftp_proxy=http://10.x.x.x:y/
#no_proxy=localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,smtp.mydomain.com

# If you do not want to use proxy at all, set this to off.
use_proxy = on
should of course be :

Code: Select all

use_proxy = off
Thank you for pointing me in the right direction :D