vSL - the vSMTP Scripting Language

vSL is a lightweight scripting language dedicated to email filtering. It is based on the Rhai scripting language.

The entry point for vSMTP is a file defined in the configuration file (/etc/vsmtp/rules/main.vsl usually). This file must be evaluated as a Rhai map, composed of keys and values.

To avoid repetitive code in your logics, you can define objects, use the vsl api and use dedicated services to interact with third-party software.

A /etc/vsmtp/rules/main.vsl file can grow large is you define a lot of logics, but you can split all your .vsl in severals files using Rhai modules.

Store all you .vsl files in the /etc/vsmtp/rules folder and use a version control system such as git.

Syntax highlighting is available for Microsoft VSCode IDE, using the Rhai extension.