Knowledge base

<smtp-listener>

The inbound SMTP listener
What is accepted on one port, and how

The smtp-listener line at the root of the file opens a port. A block with the same address describes how to handle connections on it — and everything written in it concerns only this port.

Three lines decide the port’s role. source binds it to a named source block, canceling the usual address-based matching — this is how submission and inbound mail receiving are separated onto different ports. await-slot decides whether to wait for a free slot when the inbound connection ceiling is reached, or to refuse. immediate-tls enables encryption from the first byte, without the STARTTLS command.

The rest is encryption: a tls-certificate of its own per port (inherited from the node’s common line), the choice of versions and cipher sets, client certificate verification. Plus three lines about the PROXY protocol, if a load balancer stands in front of the node.

Example configuration
# two ports with different roles: submission and inbound mail receiving
smtp-listener 0/0:2525
smtp-listener 0/0:25

<smtp-listener 0/0:25>
    source inbound-only
    await-slot true
</smtp-listener>
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.