X-Git-Url: https://git.siccegge.de//index.cgi?p=dane-monitoring-plugins.git;a=blobdiff_plain;f=check_dane_smtp;h=c63cfed4f47c25804f575a29ae642000aa54edb1;hp=d9c273225300931bbf94fa22e77444a86c6578df;hb=7e6fd5ecc25d728c5e061590db0efd9ee92e8d6e;hpb=51d6a5e599dcccbe4c6ee381c54d25c432a36e7f diff --git a/check_dane_smtp b/check_dane_smtp index d9c2732..c63cfed 100755 --- a/check_dane_smtp +++ b/check_dane_smtp @@ -24,6 +24,12 @@ def init_connection(sslcontext, args): connection = sslcontext.wrap_socket(socket(AF_INET), server_hostname=host) connection.connect((host, port)) + answer = connection.recv(512) + logging.debug(answer) + + connection.send(b"EHLO localhost\r\n") + answer = connection.recv(512) + logging.debug(answer) else: port = 25 if args.port == 0 else args.port @@ -43,6 +49,10 @@ def init_connection(sslcontext, args): connection = sslcontext.wrap_socket(connection, server_hostname=host) connection.do_handshake() + connection.send(b"EHLO localhost\r\n") + answer = connection.recv(512) + logging.debug(answer) + return connection