Configuring the vSMTP service

vSMTP configuration file

The vSMTP service (network, default directories, tls, etc.) can be configured by modifying the vsmtp.toml file. Its default location is /etc/vsmtp.

When starting vSMTP, the configuration file is read and entirely parsed, producing an error if the format is invalid or a field value is incorrect. The server never crashes if the configuration is loaded successfully.

The folder examples/config contains example of vSMTP configuration. All fields are optional and set to default if missing.

☞ | vSMTP service must be restarted to apply changes.

Configuring SMTP filtering

SMTP filtering is performed by the rule engine. The end user can interact and modify the behavior of vSMTP by adding objects and rules in .vsl configuration files. The main.vsl file in the “rules” folder is injected into the rules engine. It is the entry point for your filtering.

If there is no .vsl file, the server will refuse all incoming and outgoing mails, as well as domain forwarding. The .vSL files are commonly stored in the /etc/vsmtp/rules directory.

Please refer to the examples in the vSMTP repository and read the reference guide on vSL for detailed information.

☞ | vSMTP service must be restarted to apply changes.