Skip to main content
Version: 0.16

Overview

A "session" refers to a single incoming SMTP connection. Each SMTP session progresses through a series of distinct stages, each with its own function:

  • Connect: the initial stage, where the server and client establish a connection.
  • EHLO: the client introduces itself to the server.
  • AUTH: the client provides authentication details.
  • MAIL: the client specifies the sender of the message.
  • RCPT: the client provides one or more recipients.
  • DATA: the client transmits the actual message content.

Each stage is configured by its own singleton so that specific behaviour can be applied at each point in an SMTP session. Most stages support running Sieve scripts, allowing custom filters that reject, alter, or reroute incoming messages based on a wide range of criteria.

Limits

Session-wide limits are configured on the MtaInboundSession singleton (found in the WebUI under Settings › MTA › Inbound › Session). The relevant fields are timeout (how long to wait for a client command before the connection is terminated, default 5 minutes), transferLimit (the maximum number of bytes transferred within a single session, default 262144000, 250 MB), and maxDuration (the maximum length of a single SMTP session, default 10 minutes). Each field accepts an expression and may branch on listener, remote IP, or other connection-level variables.

Example configuration with all three limits set together:

{
"timeout": {"else": "5m"},
"transferLimit": {"else": "262144000"},
"maxDuration": {"else": "10m"}
}