Root supervisor of the Sovite MTA.
It loads and validates the configuration before starting anything. With
an invalid config, the errors are logged and start_link/1 returns
{:error, {:invalid_config, errors}}, so the MTA never runs with a
half-valid setup.
To embed the MTA in another application, add it to that application's supervision tree:
children = [
{Sovite.Core.Supervisor, config_path: "/etc/sovite/sovite.toml"}
]Options
:config- an already validatedSovite.Core.Configstruct.:config_path- path to the config file. Ignored when:configis given. Defaults toSovite.Core.Config.default_path/0.:name- the supervisor's registered name. Defaults to this module.:queue_manager- extraSovite.Core.QueueManageroptions, such as:name(defaults toSovite.Core.QueueManager) or:resolver.
Children
In start order: the log file handler, the database (migrated before anything else starts), the cache of the domains in the database, the failed-login counter, the certificate store and the ACME client (when TLS is configured), the queue manager, and the listeners. They stop in reverse order, so listeners close first.
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.
@spec start_link(keyword()) :: Supervisor.on_start() | {:error, {:invalid_config, list()} | {:queue_directory, File.posix()}}