Crate vsmtp_rule_engine
Expand description
vSMTP rule engine
vSMTP server is built with a runtime also called rule engine
.
This runtime can execute code provided in our superset of the
https://rhai.rs language.
The viridIT scripting language (vsl) is a simple language that allow
you to define rules
and object
to control the traffic on your MTA.
Further details on the official book of vSMTP: https://vsmtp.rs/reference/vSL/vsl.html
Modules
Module containing the backend for the vsl’s Rust API.
Build sub domain hierarchy configurations.
Macros
Fetch rule engine global variables by calling the rhai system functions.
A bail macro for rhai context similar to
anyhow::bail
macro.An error formatting macro for rhai context similar to the
anyhow::anyhow
macro.Transforms a generic error into the rhai boxed eval alt result.
checks if the mutex is poisoned & return a rhai runtime error if it is.
Transforms a generic error in a result into the rhai boxed eval alt result.
Structs
a sharable rhai engine.
contains an ast representation of the user’s parsed .vsl script files,
and modules / packages to create a cheap rhai runtime.
a state container that bridges rhai’s & rust contexts.
Enums
State of vsl rules execution
Functions
Create a new command module.
Create a new smtp module.