]> git.siccegge.de Git - dane-monitoring-plugins.git/commitdiff
Properly send EHLO after TLS
authorChristoph Egger <christoph@christoph-egger.org>
Tue, 30 Aug 2016 11:42:36 +0000 (13:42 +0200)
committerChristoph Egger <christoph@christoph-egger.org>
Tue, 30 Aug 2016 11:43:34 +0000 (13:43 +0200)
check_dane_smtp

index d9c273225300931bbf94fa22e77444a86c6578df..c63cfed4f47c25804f575a29ae642000aa54edb1 100755 (executable)
@@ -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