Sovite.Core.CLI (sovite v0.6.0)

Copy Markdown View Source

The sovitectl command line.

Releases ship a bin/sovitectl wrapper that runs main/1 with bin/sovite eval. The VM is not started as a server, so these commands work whether or not the MTA is running.

sovitectl config check [PATH]
sovitectl config show -n
sovitectl queue list deferred
sovitectl queue requeue 8CboABCDEFGHIJ
sovitectl route alice@example.com
sovitectl status
sovitectl trace '<message-id@example.com>'
sovitectl report --date yesterday
sovitectl user list
sovitectl user add alice@example.com        # reads the password from stdin
sovitectl user sender add alice@example.com @example.org
sovitectl domain add example.com hosted
sovitectl mailbox add alice@example.com
sovitectl alias add sales@example.com alice@example.com bob@example.com
sovitectl hash-password                     # for auth.backend = "file"
sovitectl dkim generate example.com s2026 /etc/sovite/dkim/example.com.pem
sovitectl dns records example.com
sovitectl cluster status
sovitectl cluster config push /etc/sovite/cluster.toml
sovitectl migrate postfix /etc/postfix --output /root/sovite

Commands that use the database read the config file given with --config PATH, or the default one. Commands that act on the running server (queue flush, hold, release, delete, requeue, config reload, config diff, status, cluster, and ip-pool) use the admin API (Sovite.Core.Web.API) at the address and with the token the config file names, so they must run as a user that can read the token file.

Summary

Functions

Runs the command in argv and halts the VM with its exit status.

Runs the command in argv and returns its exit status.

Functions

main(argv)

@spec main([String.t()]) :: no_return()

Runs the command in argv and halts the VM with its exit status.

run(argv)

@spec run([String.t()]) :: non_neg_integer()

Runs the command in argv and returns its exit status.