From 7e6fd5ecc25d728c5e061590db0efd9ee92e8d6e Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Tue, 30 Aug 2016 13:42:36 +0200 Subject: [PATCH] Properly send EHLO after TLS --- check_dane_smtp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.39.5