Global configuration directives

These directives can be specified outside of any configuration blocks and they are applied to all modules.

Some directives can be overridden on per-module basis (e.g. hostname).

Syntax: state_dir path
Default: /var/lib/maddy

The path to the state directory. This directory will be used to store all persistent data and should be writable.

Syntax: runtime_dir path
Default: /run/maddy

The path to the runtime directory. Used for Unix sockets and other temporary objects. Should be writable.

Syntax: hostname domain
Default: not specified

Internet hostname of this mail server. Typicall FQDN is used. It is recommended to make sure domain specified here resolved to the public IP of the server.

Syntax: autogenerated_msg_domain domain
Default: not specified

Domain that is used in From field for auto-generated messages (such as Delivery Status Notifications).

Syntax:
tls file cert_file pkey_file
tls module reference
tls off
Default: not specified

Default TLS certificate to use for all endpoints.

Must be present in either all endpoint modules configuration blocks or as global directive.

You can also specify other configuration options such as cipher suites and TLS version. See maddy-tls(5) for details. maddy uses reasonable cipher suites and TLS versions by default so you generally don't have to worry about it.

Syntax: tls_client { ... }
Default: not specified

This is optional block that specifies various TLS-related options to use when making outbound connections. See TLS client configuration for details on directives that can be used in it. maddy uses reasonable cipher suites and TLS versions by default so you generally don't have to worry about it.

Syntax:
log targets...
log off
Default: stderr

Write log to one of more "targets".

The target can be one or the following:

Write logs to stderr.

Write logs to stderr with timestamps.

Send logs to the local syslog daemon.

Write (append) logs to file.

Example:

log syslog /var/log/maddy.log

Note: Maddy does not perform log files rotation, this is the job of the logrotate daemon. Send SIGUSR1 to maddy process to make it reopen log files.

Syntax: debug boolean
Default: no

Enable verbose logging for all modules. You don't need that unless you are reporting a bug.