Skip to main content

Outbound

📄️ Overview

Stalwart MTA provides a flexible and robust framework for managing outbound email delivery. Messages sent to both local and external domains are processed through a strategy-driven architecture that allows precise control over how, when, and where each message is delivered. This architecture evaluates delivery strategies dynamically for each recipient, enabling the system to adapt its behavior based on the message context, such as the recipient's domain, the sender’s identity, message type, or assigned priority.

📄️ Strategies

In Stalwart MTA, strategies define the behavior and policies used during the delivery of email messages, whether to local recipients or remote systems. Strategies allow administrators to define flexible, dynamic delivery logic based on runtime conditions, using expressions that are evaluated for each recipient and message. This approach enables fine-grained control over message routing, scheduling, connection parameters, and transport security, adapting to the needs of complex mail environments.

📄️ Queues

Queues are essentially a holding area for outbound messages in an SMTP server. When a message arrives, it is placed in the queue until it can be delivered to its final destination. Stalwart supports an unlimited number of virtual queues, which means that a system administrator can create and configure multiple queues with different settings and behaviors. This allows for a high degree of flexibility and customization in managing incoming messages. For example, different queues can be created for different types of messages, such as messages from high-priority senders or messages with specific content, and these queues can be processed differently, such as by assigning more resources or prioritizing delivery.

📄️ Connection

A connection strategy in Stalwart MTA defines how the system establishes SMTP connections to remote servers during message delivery. While routing strategies determine where messages are delivered, connection strategies control how those connections are made. Each connection strategy specifies parameters such as which source IP address to bind to, the hostname to advertise in the EHLO command, and timeout values for various stages of the SMTP session. This level of control is particularly useful in complex environments, such as multi-homed systems, outbound IP rotation setups, or when complying with specific policy or network constraints.

📄️ Quotas

Quotas allows to set limits on the message queue to control its size and total number of messages. Stalwart supports enforcing dynamic quotas on the message queue, which means that it can limit the total size and number of messages waiting to be delivered based on multiple variables. If a queue quota is exceeded, messages will be temporarily rejected with a 4xx SMTP code. This is useful in preventing the server from becoming overwhelmed by too many messages and ensuring that important messages are delivered promptly.