From d0475e356b3d5af26af2f0cae638b41b43478e4c Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 12 Jan 2025 13:54:28 +0800 Subject: =?UTF-8?q?Reset=20state=20on=20STARTTLS,=20conforming=20to=20RFC7?= =?UTF-8?q?817=C2=A74.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mta_recv.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mta_recv.go b/mta_recv.go index 0ca81d9..7042901 100644 --- a/mta_recv.go +++ b/mta_recv.go @@ -70,6 +70,10 @@ func handle_incoming_server_connection(buf_conn *bufio.ReadWriter, net_conn *net _ = buf_conn.Flush() tls_conn = tls.Server(*net_conn, tls_config) buf_conn = bufio.NewReadWriter(bufio.NewReader(tls_conn), bufio.NewWriter(tls_conn)) + server_state = server_state_begin + remote_server_name = "" + current_mail_from = "" + current_rcpt_to = []string{""} case "HELO": if param == "" { // TODO: actually validate the hostname _, _ = buf_conn.WriteString("501 Syntax: HELO hostname\r\n") -- cgit v1.2.3