An SMTP server: a Sovite.Listener whose connections run
Sovite.SMTP.Server.Session.
Supports PIPELINING, SIZE, 8BITMIME, ENHANCEDSTATUSCODES,
STARTTLS, and AUTH. What happens to messages is decided by a
Sovite.SMTP.Server.Handler:
children = [
{Sovite.SMTP.Server,
port: 2525,
hostname: "mx.example.com",
handler: {MyHandler, []},
max_connections_per_ip: 10}
]Options
Listener options (see Sovite.Listener): :port, :ip, :id,
:name, :acceptors, :max_connections, :max_connections_per_ip.
TLS options:
:tls-:sslserver options (seeSovite.TLS.server_options/1), or a zero-arity function that returns them (ornil) for each new connection, such as one callingSovite.TLS.CertStore.server_options/1. Without it, or when it returnsnil, TLS is not offered.:implicit_tls- start TLS on connect, before the greeting (port 465, RFC 8314). Defaults tofalse:STARTTLSis offered instead.:tls_handshake_timeout- milliseconds. Defaults to 60 seconds.
All other options are session options, see Sovite.SMTP.Server.Session.
:hostname and :handler are required.
A connection refused by a limit gets 421 4.7.0 before it is closed,
except with implicit TLS.
Summary
Functions
Starts the server.
Functions
@spec start_link(keyword()) :: Supervisor.on_start()
Starts the server.