<div dir="ltr">Ian<div><br></div><div>[disclaimer: I don't use the smtp check]</div><div><br></div><div>I'm wondering if the "connect timeout" relates not to the TCP connection but the SMTP conversation. I would do a packet capture during the interaction between xymonnet and the mail server, and see if it closely matches your telnet interaction, or deviates.</div><div><br></div><div>The smtp check is defined in protocols.cfg</div><div><div><br></div><div>[smtp]<br>   send "mail\r\nquit\r\n"<br>   expect "220"<br>   options banner<br>   port 25<br></div><div><br></div></div><div>This expects a 220 in the response after the mail\r\nquit\r\n is sent:</div><div><br></div><div>'<i>It will <b>then </b>expect a response beginning with "220".</i>' (my emphasis on the word "then")</div><div><br></div><div>Your interaction shows 221 instead of 220, after the mail/quit strings. But if this is the problem, then protocols.cfg has been wrong for many, many years. I suspect (contrary to what I infer from the man page) that "expect" looks in the strings for the whole interaction, not just the ones after the "send" string is sent. In which case, the protocols.cfg entry for smtp should work fine.<br></div><div><br></div><div>However, you might like to test removing the "expect" or altering to look for 221 instead of 220.</div><div><br></div><div>Cheers</div><div>Jeremy</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 29 Sept 2021 at 00:22, Ian Diddams via Xymon <<a href="mailto:xymon@xymon.com">xymon@xymon.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><br><br>---------- Forwarded message ----------<br>From: Ian Diddams <<a href="mailto:didds3@yahoo.co.uk" target="_blank">didds3@yahoo.co.uk</a>><br>To: xymon <<a href="mailto:xymon@xymon.com" target="_blank">xymon@xymon.com</a>><br>Cc: <br>Bcc: <br>Date: Tue, 28 Sep 2021 13:52:12 +0000 (UTC)<br>Subject: SMTP checks<br><div><div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:10px"><div dir="ltr"><div>xymon server 4.3.28, centos 7.9<br>mail server centos 6 (about to be replaced anyway)<br></div><br>I'm in a bit of a quandary...</div><div dir="ltr"><br></div><div dir="ltr">we have an smtp check of a server ("oscar").<br><br>Literally for "years" (3+) the xymon in house smtp check has been more than happy.<br><br><div dir="ltr">Then since Sept 11th [1] its been flipping constantly beyween green and happy to red <br>eg<br><div><pre style="color:rgb(216,216,191);font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(0,0,0);text-decoration-style:initial;text-decoration-color:initial">Service listening but unavailable (connect timeout)


Seconds: 0.001842000</pre></div><div><br></div><div dir="ltr">But if I run a telnet test from the xymon server itself it always connects immediately, and responds instantaneously.<br><br>eg<br><br><div dir="ltr"><font color="#cd232c">$ telnet oscar 25<br></font><div><font color="#cd232c">Trying <redacted>...</font></div><font color="#cd232c">Connected to oscar.<br>Escape character is '^]'.<br>220 <a href="http://a.b.co.uk" target="_blank">a.b.co.uk</a> ESMTP Postfix<br>mail<br>501 5.5.4 Syntax: MAIL FROM:<address><br>quit<br>221 2.0.0 Bye<br>Connection closed by foreign host.<br>$</font><br><br><br><br></div><div dir="ltr">All xymon logs show are emails being sent because of the alerts, ad falling statuses that are a result of the constant flipping from red to green. maillog has nothing untoward, ditto messages.<br><br><div>Anyone any ideas what on earth is suddenly occurring that may explain this recent timeout issue?  any expereince of similar?</div><div><br></div><div dir="ltr">didds<br></div><br><br></div></div></div><br><div dir="ltr">[1] no changes made around that time etc.  Networks confirm nothing shoing in their logs etc.<br></div></div></div></div><br><br><br>---------- Forwarded message ----------<br>From: Ian Diddams via Xymon <<a href="mailto:xymon@xymon.com" target="_blank">xymon@xymon.com</a>><br>To: xymon <<a href="mailto:xymon@xymon.com" target="_blank">xymon@xymon.com</a>><br>Cc: <br>Bcc: <br>Date: Tue, 28 Sep 2021 13:52:12 +0000 (UTC)<br>Subject: [Xymon] SMTP checks<br>_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com" target="_blank">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
</blockquote></div>