Email test fails
Email test fails
Hi,
I in the process of evaluating NLS. I am trying to setup NLS with my mail server info so I can move forward with alerting. However all the tests fail and I can not seem to get to go through. Under Administration/Mail Settings shown in the mail settings attachment.
When I test on this page, the test takes a few minutes then I get the following message.... and no mail is sent.
"There was an error trying to send the email. Here is what the server said: 220 <SERVERNAME> Microsoft ESMTP MAIL Service ready at Mon, 1 Jun 2015 15:32:06 -0500"
I can see from the mail server that there are no connections from the NLS server, it seems like the NLS server can get to the SMTP server in question, but once the 220 response is made communication stops. From the NLS servers console, I can telnet to the mail server and send mail with out issue.
Tried looking in /var/log/maillog for any clues but there is not much there...
tail -f /var/log/maillog
Jun 1 16:54:07 localhost sendmail[9273]: starting daemon (8.14.4): SMTP+queueing@01:00:00
Jun 1 16:54:07 localhost sm-msp-queue[9281]: starting daemon (8.14.4): queueing@01:00:0
I would welcome any assistance...
Thanks in advance
gtolson
I in the process of evaluating NLS. I am trying to setup NLS with my mail server info so I can move forward with alerting. However all the tests fail and I can not seem to get to go through. Under Administration/Mail Settings shown in the mail settings attachment.
When I test on this page, the test takes a few minutes then I get the following message.... and no mail is sent.
"There was an error trying to send the email. Here is what the server said: 220 <SERVERNAME> Microsoft ESMTP MAIL Service ready at Mon, 1 Jun 2015 15:32:06 -0500"
I can see from the mail server that there are no connections from the NLS server, it seems like the NLS server can get to the SMTP server in question, but once the 220 response is made communication stops. From the NLS servers console, I can telnet to the mail server and send mail with out issue.
Tried looking in /var/log/maillog for any clues but there is not much there...
tail -f /var/log/maillog
Jun 1 16:54:07 localhost sendmail[9273]: starting daemon (8.14.4): SMTP+queueing@01:00:00
Jun 1 16:54:07 localhost sm-msp-queue[9281]: starting daemon (8.14.4): queueing@01:00:0
I would welcome any assistance...
Thanks in advance
gtolson
You do not have the required permissions to view the files attached to this post.
Re: Email test fails
Would you mind getting a capture of the communication done between your computer and the SMTP server? I've seen this issue a couple of times, and currently it's looking like there might be a bug in the way the test button works. If you save your settings (without testing), are you capable of getting other alerts?
After starting the above, hit the 'test' button to see where the communication might be hanging.
Code: Select all
tcpdump -n host smtp.server.here -XRe: Email test fails
Sure... here is the output... Looks like we are seeing timeouts...
Thanks for taking a look! looking forward hearing back on this...
========================
Thanks for taking a look! looking forward hearing back on this...
========================
Code: Select all
[root@MCGCNLS ~]# tcpdump -n host 1.1.1.1 -X
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
13:04:07.935410 IP 2.2.2.2.42658 > 1.1.1.1.smtp: Flags [S], seq 1893709531, win 14600, options [mss 1460,sackOK,TS val 1739902 ecr 0,nop,wscale 7], length 0
0x0000: 4500 003c 3aa5 4000 4006 76f0 c0a8 020e E..<:.@[email protected].....
0x0010: c0a8 05c8 a6a2 0019 70df b6db 0000 0000 ........p.......
0x0020: a002 3908 2ac2 0000 0204 05b4 0402 080a ..9.*...........
0x0030: 001a 8c7e 0000 0000 0103 0307 ...~........
13:04:07.935679 IP 1.1.1.1.smtp > 2.2.2.2.42658: Flags [S.], seq 1972175243, ack 1893709532, win 8192, options [mss 1460,nop,wscale 8,sackOK,TS val 50221057 ecr 1739902], length 0
0x0000: 4500 003c 1dfd 4000 7f06 5498 c0a8 05c8 E..<[email protected].....
0x0010: c0a8 020e 0019 a6a2 758d 018b 70df b6dc ........u...p...
0x0020: a012 2000 79a0 0000 0204 05b4 0103 0308 ....y...........
0x0030: 0402 080a 02fe 5001 001a 8c7e ......P....~
13:04:07.935704 IP 2.2.2.2.42658 > 1.1.1.1.smtp: Flags [.], ack 1, win 115, options [nop,nop,TS val 1739902 ecr 50221057], length 0
0x0000: 4500 0034 3aa6 4000 4006 76f7 c0a8 020e E..4:.@[email protected].....
0x0010: c0a8 05c8 a6a2 0019 70df b6dc 758d 018c ........p...u...
0x0020: 8010 0073 c7fa 0000 0101 080a 001a 8c7e ...s...........~
0x0030: 02fe 5001 ..P.
13:04:07.936451 IP 1.1.1.1.smtp > 2.2.2.2.42658: Flags [P.], seq 1:105, ack 1, win 514, options [nop,nop,TS val 50221057 ecr 1739902], length 104
0x0000: 4500 009c 1dfe 4000 7f06 5437 c0a8 05c8 [email protected]....
0x0010: c0a8 020e 0019 a6a2 758d 018c 70df b6dc ........u...p...
0x0020: 8018 0202 af18 0000 0101 080a 02fe 5001 ..............P.
0x0030: 001a 8c7e 3232 3020 4d43 4743 4558 4341 ...~220.MCGCEXCA
0x0040: 5331 3032 2e63 6f2e 6d63 6865 6e72 792e S102.aa.bb.
0x0050: 696c 2e75 7320 4d69 6372 6f73 6f66 7420 cc.net.Microsoft.
0x0060: 4553 4d54 5020 4d41 494c 2053 6572 7669 ESMTP.MAcc.Servi
0x0070: 6365 2072 6561 6479 2061 7420 5475 652c ce.ready.at.Tue,
0x0080: 2032 204a 756e 2032 3031 3520 3133 3a30 .2.Jun.2015.13:0
0x0090: 343a 3037 202d 3035 3030 0d0a 4:07.-0500..
13:04:07.936463 IP 2.2.2.2.42658 > 1.1.1.1.smtp: Flags [.], ack 105, win 115, options [nop,nop,TS val 1739903 ecr 50221057], length 0
0x0000: 4500 0034 3aa7 4000 4006 76f6 c0a8 020e E..4:.@[email protected].....
0x0010: c0a8 05c8 a6a2 0019 70df b6dc 758d 01f4 ........p...u...
0x0020: 8010 0073 c791 0000 0101 080a 001a 8c7f ...s............
0x0030: 02fe 5001 ..P.
13:04:07.936818 IP 2.2.2.2.42658 > 1.1.1.1.smtp: Flags [P.], seq 1:19, ack 105, win 115, options [nop,nop,TS val 1739903 ecr 50221057], length 18
0x0000: 4500 0046 3aa8 4000 4006 76e3 c0a8 020e E..F:.@[email protected].....
0x0010: c0a8 05c8 a6a2 0019 70df b6dc 758d 01f4 ........p...u...
0x0020: 8018 0073 895f 0000 0101 080a 001a 8c7f ...s._..........
0x0030: 02fe 5001 4548 4c4f 2031 3932 2e31 3638 ..P.EHLO.2.2
0x0040: 2e32 2e31 340a .2.2.
13:04:08.136948 IP 2.2.2.2.42658 > 1.1.1.1.smtp: Flags [P.], seq 1:19, ack 105, win 115, options [nop,nop,TS val 1740104 ecr 50221057], length 18
0x0000: 4500 0046 3aa9 4000 4006 76e2 c0a8 020e E..F:.@[email protected].....
0x0010: c0a8 05c8 a6a2 0019 70df b6dc 758d 01f4 ........p...u...
0x0020: 8018 0073 895f 0000 0101 080a 001a 8d48 ...s._.........H
0x0030: 02fe 5001 4548 4c4f 2031 3932 2e31 3638 ..P.EHLO.2.2
0x0040: 2e32 2e31 340a .2.2.
13:04:08.137223 IP 1.1.1.1.smtp > 2.2.2.2.42658: Flags [.], ack 19, win 514, options [nop,nop,TS val 50221077 ecr 1739903,nop,nop,sack 1 {1:19}], length 0
0x0000: 4500 0040 1e1a 4000 7f06 5477 c0a8 05c8 E..@[email protected]....
0x0010: c0a8 020e 0019 a6a2 758d 01f4 70df b6ee ........u...p...
0x0020: b010 0202 403b 0000 0101 080a 02fe 5015 ....@;........P.
0x0030: 001a 8c7f 0101 050a 70df b6dc 70df b6ee ........p...p...
13:05:07.988399 IP 2.2.2.2.42658 > 1.1.1.1.smtp: Flags [P.], seq 19:52, ack 105, win 115, options [nop,nop,TS val 1799955 ecr 50221077], length 33
0x0000: 4500 0055 3aaa 4000 4006 76d2 c0a8 020e E..U:.@[email protected].....
0x0010: c0a8 05c8 a6a2 0019 70df b6ee 758d 01f4 ........p...u...
0x0020: 8018 0073 896e 0000 0101 080a 001b 7713 ...s.n........w.
0x0030: 02fe 5015 4d41 494c 2046 524f 4d3a 3c4e ..P.MAcc.FROM:<N
0x0040: 4c53 4063 6f2e 6d63 6865 6e72 792e 696c [email protected]
0x0050: 2e75 733e 0a .net>.
13:05:08.200092 IP 1.1.1.1.smtp > 2.2.2.2.42658: Flags [.], ack 52, win 514, options [nop,nop,TS val 50227083 ecr 1799955], length 0
0x0000: 4500 0034 4c74 4000 7f06 2629 c0a8 05c8 E..4Lt@...&)....
0x0010: c0a8 020e 0019 a6a2 758d 01f4 70df b70f ........u...p...
0x0020: 8010 0202 c3b0 0000 0101 080a 02fe 678b ..............g.
0x0030: 001b 7713 ..w.
13:06:08.032229 IP 2.2.2.2.42658 > 1.1.1.1.smtp: Flags [P.], seq 52:92, ack 105, win 115, options [nop,nop,TS val 1859999 ecr 50227083], length 40
0x0000: 4500 005c 3aab 4000 4006 76ca c0a8 020e E..\:.@[email protected].....
0x0010: c0a8 05c8 a6a2 0019 70df b70f 758d 01f4 ........p...u...
0x0020: 8018 0073 8975 0000 0101 080a 001c 619f ...s.u........a.
0x0030: 02fe 678b 5243 5054 2054 4f3a 3c67 746f ..g.RCPT.TO:<user
0x0040: 6c73 6f6e 6164 6d69 6e40 636f 2e6d 6368 [email protected]
0x0050: 656e 7279 2e69 6c2e 7573 3e0a bbbb.cc.net>.
13:06:08.230445 IP 1.1.1.1.smtp > 2.2.2.2.42658: Flags [.], ack 92, win 514, options [nop,nop,TS val 50233086 ecr 1859999], length 0
0x0000: 4500 0034 654d 4000 7f06 0d50 c0a8 05c8 [email protected]....
0x0010: c0a8 020e 0019 a6a2 758d 01f4 70df b737 ........u...p..7
0x0020: 8010 0202 c188 0000 0101 080a 02fe 7efe ..............~.
0x0030: 001c 619f ..a.
13:07:08.090551 IP 2.2.2.2.42658 > 1.1.1.1.smtp: Flags [P.], seq 92:97, ack 105, win 115, options [nop,nop,TS val 1920057 ecr 50233086], length 5
0x0000: 4500 0039 3aac 4000 4006 76ec c0a8 020e E..9:.@[email protected].....
0x0010: c0a8 05c8 a6a2 0019 70df b737 758d 01f4 ........p..7u...
0x0020: 8018 0073 8952 0000 0101 080a 001d 4c39 ...s.R........L9
0x0030: 02fe 7efe 4441 5441 0a ..~.DATA.
13:07:08.292969 IP 1.1.1.1.smtp > 2.2.2.2.42658: Flags [.], ack 97, win 514, options [nop,nop,TS val 50239092 ecr 1920057], length 0
0x0000: 4500 0034 7930 4000 7f06 f96c c0a8 05c8 [email protected]....
0x0010: c0a8 020e 0019 a6a2 758d 01f4 70df b73c ........u...p..<
0x0020: 8010 0202 bf72 0000 0101 080a 02fe 9674 .....r.........t
0x0030: 001d 4c39 ..L9
13:08:08.146372 IP 2.2.2.2.42658 > 1.1.1.1.smtp: Flags [P.], seq 97:632, ack 105, win 115, options [nop,nop,TS val 1980113 ecr 50239092], length 535
0x0000: 4500 024b 3aad 4000 4006 74d9 c0a8 020e E..K:.@[email protected].....
0x0010: c0a8 05c8 a6a2 0019 70df b73c 758d 01f4 ........p..<u...
0x0020: 8018 0073 8b64 0000 0101 080a 001e 36d1 ...s.d........6.
0x0030: 02fe 9674 5573 6572 2d41 6765 6e74 3a20 ...tUser-Agent:.
0x0040: 4e61 6769 6f73 204c 6f67 2053 6572 7665 Nagios.Log.Serve
0x0050: 720a 4461 7465 3a20 5475 652c 2032 204a r.Date:.Tue,.2.J
0x0060: 756e 2032 3031 3520 3134 3a30 343a 3037 un.2015.14:04:07
0x0070: 202d 3034 3030 0a54 6f3a 2067 746f 6c73 .-0400.To:.user
0x0080: 6f6e 6164 6d69 6e40 636f 2e6d 6368 656e [email protected]
0x0090: 7279 2e69 6c2e 7573 0a46 726f 6d3a 203c bb.cc.net.From:.<
0x00a0: 4e4c 5340 636f 2e6d 6368 656e 7279 2e69 [email protected]
0x00b0: 6c2e 7573 3e0a 5265 7475 726e 2d50 6174 l.net>.Return-Pat
0x00c0: 683a 203c 4e4c 5340 636f 2e6d 6368 656e h:.<[email protected]
0x00d0: 7279 2e69 6c2e 7573 3e0a 5375 626a 6563 bb.cc.net>.Subjec
0x00e0: 743a 203d 3f75 7466 2d38 3f51 3f4e 6167 t:.=?utf-8?Q?Nag
0x00f0: 696f 735f 4c6f 675f 5365 7276 6572 5f54 ios_Log_Server_T
0x0100: 6573 745f 456d 6169 6c3f 3d0a 5265 706c est_Email?=.Repl
0x0110: 792d 546f 3a20 224e 4c53 4063 6f2e 6d63 y-To:."[email protected]
0x0120: 6865 6e72 792e 696c 2e75 7322 203c 4e4c bbbbb.cc.net".<NL
0x0130: 5340 636f 2e6d 6368 656e 7279 2e69 6c2e [email protected].
0x0140: 7573 3e0a 582d 5365 6e64 6572 3a20 4e4c us>.X-Sender:.NL
0x0150: 5340 636f 2e6d 6368 656e 7279 2e69 6c2e [email protected].
0x0160: 7573 0a58 2d4d 6169 6c65 723a 204e 6167 us.X-Mailer:.Nag
0x0170: 696f 7320 4c6f 6720 5365 7276 6572 0a58 ios.Log.Server.X
0x0180: 2d50 7269 6f72 6974 793a 2033 2028 4e6f -Priority:.3.(No
0x0190: 726d 616c 290a 4d65 7373 6167 652d 4944 rmal).Message-ID
0x01a0: 3a20 3c35 3536 6466 3031 3765 3434 3864 :.<556df017e448d
0x01b0: 4063 6f2e 6d63 6865 6e72 792e 696c 2e75 @aa.bb.cc.ne
0x01c0: 733e 0a4d 696d 652d 5665 7273 696f 6e3a t>.Mime-Version:
0x01d0: 2031 2e30 0a43 6f6e 7465 6e74 2d54 7970 .1.0.Content-Typ
0x01e0: 653a 2074 6578 742f 706c 6169 6e3b 2063 e:.text/plain;.c
0x01f0: 6861 7273 6574 3d75 7466 2d38 0a43 6f6e harset=utf-8.Con
0x0200: 7465 6e74 2d54 7261 6e73 6665 722d 456e tent-Transfer-En
0x0210: 636f 6469 6e67 3a20 3862 6974 0a0a 5468 coding:.8bit..Th
0x0220: 6973 2065 6d61 696c 2069 7320 6120 7465 is.emacc.is.a.te
0x0230: 7374 2066 726f 6d20 4e61 6769 6f73 204c st.from.Nagios.L
0x0240: 6f67 2053 6572 7665 720a 0a og.Server..
13:08:08.340416 IP 1.1.1.1.smtp > 2.2.2.2.42658: Flags [.], ack 632, win 512, options [nop,nop,TS val 50245097 ecr 1980113], length 0
0x0000: 4500 0034 6c4b 4000 7f06 0652 c0a8 05c8 [email protected]....
0x0010: c0a8 020e 0019 a6a2 758d 01f4 70df b953 ........u...p..S
0x0020: 8010 0200 bb4f 0000 0101 080a 02fe ade9 .....O..........
0x0030: 001e 36d1 ..6.
13:08:08.340453 IP 2.2.2.2.42658 > 1.1.1.1.smtp: Flags [P.], seq 632:634, ack 105, win 115, options [nop,nop,TS val 1980307 ecr 50245097], length 2
0x0000: 4500 0036 3aae 4000 4006 76ed c0a8 020e E..6:.@[email protected].....
0x0010: c0a8 05c8 a6a2 0019 70df b953 758d 01f4 ........p..Su...
0x0020: 8018 0073 894f 0000 0101 080a 001e 3793 ...s.O........7.
0x0030: 02fe ade9 2e0a ......
13:08:08.543264 IP 1.1.1.1.smtp > 2.2.2.2.42658: Flags [.], ack 634, win 512, options [nop,nop,TS val 50245117 ecr 1980307], length 0
0x0000: 4500 0034 6de8 4000 7f06 04b5 c0a8 05c8 E..4m.@.........
0x0010: c0a8 020e 0019 a6a2 758d 01f4 70df b955 ........u...p..U
0x0020: 8010 0200 ba77 0000 0101 080a 02fe adfd .....w..........
0x0030: 001e 3793 ..7.
13:09:07.998897 IP 1.1.1.1.smtp > 2.2.2.2.42658: Flags [P.], seq 105:149, ack 634, win 512, options [nop,nop,TS val 50251062 ecr 1980307], length 44
0x0000: 4500 0060 742d 4000 7f06 fe43 c0a8 05c8 E..`[email protected]....
0x0010: c0a8 020e 0019 a6a2 758d 01f4 70df b955 ........u...p..U
0x0020: 8018 0200 2641 0000 0101 080a 02fe c536 ....&A.........6
0x0030: 001e 3793 3435 3120 342e 372e 3020 5469 ..7.451.4.7.0.Ti
0x0040: 6d65 6f75 7420 7761 6974 696e 6720 666f meout.waiting.fo
0x0050: 7220 636c 6965 6e74 2069 6e70 7574 0d0a r.client.input..
13:09:07.999063 IP 1.1.1.1.smtp > 2.2.2.2.42658: Flags [F.], seq 149, ack 634, win 512, options [nop,nop,TS val 50251062 ecr 1980307], length 0
0x0000: 4500 0034 742e 4000 7f06 fe6e c0a8 05c8 [email protected]....
0x0010: c0a8 020e 0019 a6a2 758d 0220 70df b955 ........u...p..U
0x0020: 8011 0200 a311 0000 0101 080a 02fe c536 ...............6
0x0030: 001e 3793 ..7.
13:09:07.999680 IP 2.2.2.2.42658 > 1.1.1.1.smtp: Flags [F.], seq 634, ack 150, win 115, options [nop,nop,TS val 2039966 ecr 50251062], length 0
0x0000: 4500 0034 3aaf 4000 4006 76ee c0a8 020e E..4:.@[email protected].....
0x0010: c0a8 05c8 a6a2 0019 70df b955 758d 0221 ........p..Uu..!
0x0020: 8011 0073 bb91 0000 0101 080a 001f 209e ...s............
0x0030: 02fe c536 ...6
13:09:07.999927 IP 1.1.1.1.smtp > 2.2.2.2.42658: Flags [.], ack 635, win 512, options [nop,nop,TS val 50251062 ecr 2039966], length 0
0x0000: 4500 0034 742f 4000 7f06 fe6d c0a8 05c8 E..4t/@....m....
0x0010: c0a8 020e 0019 a6a2 758d 0221 70df b956 ........u..!p..V
0x0020: 8010 0200 ba04 0000 0101 080a 02fe c536 ...............6
0x0030: 001f 209e ....
^C
22 packets captured
22 packets received by filter
====================================================Re: Email test fails
Do you have any antivirus/antispam 3rd party products installed on your mail server? If so, you might want to check the logs to see if they are blocking it for some reason.
Re: Email test fails
We do not have any 3rd party av/as of any kind on the mail server. I can open a telnet connection from the Nagios log server on port 25 and send mail with out issue, and we have many internal systems relaying off of this server with out issue.
Re: Email test fails
The only things that I am finding that produce that response are from anti-virus/anti-spam/untangle, black hole routers, and IPS/filtering devices interrupting the connections. Are you sure you don't have any of those devices between them? (it doesn't mean that telnet sending mail won't work).
You can check for black hole routers with this command and read more about it below:
Ping from your LS to your mail server.
ping X.X.X.X -f -l 1472
https://support.microsoft.com/en-us/kb/314825/en-us
You can check for black hole routers with this command and read more about it below:
Ping from your LS to your mail server.
ping X.X.X.X -f -l 1472
https://support.microsoft.com/en-us/kb/314825/en-us
Re: Email test fails
Thank for your responce!
I am getting responses when pinging with the do not fragment and the mtu set. I get the same results doing this from the NLS to the mail server or from the NLS to a server on the same local subnet.
The only item between the NLS and the mail server is a core switch doing inter-vlan routing. I have triple checked there is no av product of any kind on the SMTP server.
To try it, I modified the sendmail.cf file with the relay address of the mail server, set the NLS to use PHP mail and I can send mail successfully. As far as I can see this points to something with the SMTP mail setting in NLS?
I am getting responses when pinging with the do not fragment and the mtu set. I get the same results doing this from the NLS to the mail server or from the NLS to a server on the same local subnet.
The only item between the NLS and the mail server is a core switch doing inter-vlan routing. I have triple checked there is no av product of any kind on the SMTP server.
To try it, I modified the sendmail.cf file with the relay address of the mail server, set the NLS to use PHP mail and I can send mail successfully. As far as I can see this points to something with the SMTP mail setting in NLS?
Re: Email test fails
It looks like you have no authorization configured. Are you certain that you're using the proper SMTP settings? Please note that the 'Save Settings' button must be pressed before the 'Test Settings' button.
I filed a bug report awhile ago that has to do with our SMTP 'Test Settings' button not sending exactly proper CR LF packets. That bug report has yet to be looked into by a developer, but a new Log Server release is coming up, and I expect I will have more information by that point.
I filed a bug report awhile ago that has to do with our SMTP 'Test Settings' button not sending exactly proper CR LF packets. That bug report has yet to be looked into by a developer, but a new Log Server release is coming up, and I expect I will have more information by that point.
Re: Email test fails
Thanks again for responding!
I am 100% sure that there is not auth needed to relay and these are the correct settings. I did make sure that I did save settings before testing, also thinking it might just be something with he Test button I triggered the alert and get the same response. As soon as I switch to PHP mail both the test and alert triggers work.
I am 100% sure that there is not auth needed to relay and these are the correct settings. I did make sure that I did save settings before testing, also thinking it might just be something with he Test button I triggered the alert and get the same response. As soon as I switch to PHP mail both the test and alert triggers work.
Re: Email test fails
gtolson,
If you save your settings, could you try and trigger an alert to see if any emails will go through? I am not sure this would work without the 'Test Settings' button working, but it's worth a shot.
If you save your settings, could you try and trigger an alert to see if any emails will go through? I am not sure this would work without the 'Test Settings' button working, but it's worth a shot.