Runs a Sovite.SMTP.Server.Session on an accepted socket. Started by
Sovite.Listener; see Sovite.SMTP.Server for the public API.
The socket is read in active: :once mode, so a client that floods the
server only fills the kernel buffers, and every read is followed by the
replies to all complete commands in it.
With implicit TLS (RFC 8314), the TLS handshake runs before the
greeting. With STARTTLS, it runs when the session asks for it. A
failed handshake closes the connection.
A tarpitted session's output is sent after its delay (see
Sovite.SMTP.Server.Session.take_delay/1); the socket is not read
meanwhile.
On server shutdown, open sessions get 421 4.3.2 before the socket is
closed. When the listener is drained (Sovite.Listener.drain/1), idle
sessions get it at once, and the others when their transaction ends
(Sovite.SMTP.Server.Session.idle?/1).
Telemetry
[:sovite, :smtp, :server, :session, :start]-%{system_time},%{session_id, remote_ip}[:sovite, :smtp, :server, :session, :stop]-%{duration}, same metadata[:sovite, :smtp, :server, :tls, :stop]-%{duration},%{session_id, remote_ip, protocol, cipher, sni, error}.errorisnilon success, otherwise the:sslreason, and the other TLS fields arenil.
Summary
Functions
Returns a specification to start this module under a supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.