Knowledge base

<proxy>

The proxy through which the node goes out
External addresses moved to one machine

The block describes one proxy server. It must be named — use-proxy refers to it by name — and must contain two lines: server (where to connect) and client (which address to go out from).

What it is all for. Nodes sit on internal addresses, while all external sending addresses live on one machine — the proxy. The node still looks up MX and decides where to deliver by itself, but it connects to the proxy and tells it the pair “from which address” and “to which.” The proxy carries it out.

There can be any number of blocks, each with its own name and its own external address. The choice among them is made by the use-proxy list — and that list is strictly for backup, not for balancing.

Three optional lines configure the protocol: protocol-version, include-tlv and retry-attempts. The first two have two levels above — on the sending address and on the node.

The second way to configure a proxy is smtp-proxy-source-host, and it is incompatible with this block.

Example configuration
# two proxies: the second is used only when the first did not respond
<proxy mta-proxy-a>    server 10.1.2.3:5000
    client 16.70.55.233:0  client.hostname.com
</proxy>

<proxy mta-proxy-b>
    server mta-proxy-b.internal:5000
    client 16.80.77.192:0
</proxy>

use-proxy mta-proxy-a, mta-proxy-b
The second proxy has no name set in the second line — the sending address name will be used. If the external address’s reverse record is different, it is better to set it explicitly.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.