Build & run
Quickstart
Requires cosmocc (Cosmopolitan toolchain). The dhall-c interpreter core and
datalog-dafsa store are siblings at ../dhall-c and ../datalog-dafsa;
mbedTLS is vendored under vendor/.
Native — make
make
./visage.com daemon -c config.example.dhall
Browser — make wasm
make wasm
node tests/wasm-smoke.js
Needs emscripten clang lld llvm nodejs.
Usage
./visage.com <command> [options]
daemon -c FILE run the SMTP + admin HTTP daemon
config-check -c FILE validate the config file and exit
add-alias -c FILE --alias A@D --dest X@Y
add an alias via the running daemon
rm-alias -c FILE --alias A@D --dest X@Y
remove an alias via the running daemon
log -c FILE [-n N] print recent log entries via the daemon
--help · --version
Config format
let Auth = { enabled : Bool, username : Text, password : Text }
in let Config =
{ hostname : Text
, domains : List Text
, listen : { address : Text, port : Natural }
, limits : { message : Natural, line : Natural, rcpts : Natural
, cmd_timeout : Natural, data_timeout : Natural }
, relay : { host : Text, port : Natural, auth : Auth, retries : Natural
, tls : Text, tls_ca : Text, max_attempts : Natural }
, storage : { path : Text, spool : Text }
, reply : { prefix : Text, separator : Text }
, catch_all : Text
, aliases : List { alias : Text, destinations : List Text }
, http : { address : Text, port : Natural }
, admin : { token : Text }
, dkim : List { domain : Text, selector : Text, private_key : Text }
}
in { hostname = "mx.example.com"
, domains = [ "example.com" ]
, listen = { address = "0.0.0.0", port = 2525 }
, relay = { host = "127.0.0.1", port = 2526, tls = "none", max_attempts = 100, … }
, catch_all = ""
, aliases = [ { alias = "jane@example.com", destinations = [ "jane@realmail.example" ] }
, { alias = "shopping@example.com", destinations = [ "jane@realmail.example", "bob@realmail.example" ] }
]
, …
} : Config
relay.tls is none, starttls, or starttls-verify
(an empty tls_ca uses the embedded Mozilla bundle). See config.example.dhall for the full example.