Hands SASL authentication to a Dovecot auth server, over its client
protocol (version 1.2), like Postfix's smtpd_sasl_type = dovecot.
Dovecot runs the mechanism and checks the credentials against whatever
it is set up with; Sovite only relays the exchange. Each exchange uses
its own connection, opened by start/3 and closed when it ends.
Options
:socket- path of Dovecot's auth client socket, for example/run/dovecot/auth-client, or{host, port}for TCP. Required.:service- the service name Dovecot sees. Defaults to"smtp".:timeout- milliseconds to wait for Dovecot. Defaults to 30 seconds.:client- about the SMTP client, passed on for Dovecot's policies and logs::remote_ip,:remote_port,:local_ip,:local_port, and:secured(the connection is encrypted).
Errors
As for Sovite.SASL.Server: :invalid_credentials, :temporary (Dovecot
is down or said temp), or :malformed.
Summary
Functions
Abandons an exchange and closes its connection.
Asks Dovecot which mechanisms it offers.
Starts an exchange. initial is as for Sovite.SASL.Server.start/3.
Sends the client's response to Dovecot's last challenge.
Types
@type result() :: {:ok, identity :: String.t()} | {:challenge, binary(), t()} | {:error, Sovite.SASL.Server.error(), username :: String.t() | nil}
@opaque t()
Functions
@spec abort(t()) :: :ok
Abandons an exchange and closes its connection.
Asks Dovecot which mechanisms it offers.
Starts an exchange. initial is as for Sovite.SASL.Server.start/3.
Sends the client's response to Dovecot's last challenge.