diff options
author | Runxi Yu <me@runxiyu.org> | 2025-01-13 12:10:25 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-01-13 12:10:25 +0800 |
commit | ac1e7389a083aceb87a8cb6fa81a0687a1334e75 (patch) | |
tree | a50faff22c1fa671ac5c922696fd5e6c31132a5c /mx_recv.go | |
parent | Add PostgreSQL mail store support (diff) | |
download | maild-ac1e7389a083aceb87a8cb6fa81a0687a1334e75.tar.gz maild-ac1e7389a083aceb87a8cb6fa81a0687a1334e75.tar.zst maild-ac1e7389a083aceb87a8cb6fa81a0687a1334e75.zip |
Close connections on QUIT
Diffstat (limited to 'mx_recv.go')
-rw-r--r-- | mx_recv.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -198,6 +198,10 @@ func (session *mx_recv_session) handle() error { case "QUIT": _, _ = session.buf_conn.WriteString("221 2.0.0 Bye\r\n") _ = session.buf_conn.Flush() + if session.tls_conn != nil { + session.tls_conn.Close() + } + session.net_conn.Close() return nil case "NOOP": _, _ = session.buf_conn.WriteString("250 2.0.0 Ok\r\n") |