Knowledge base

PMTA knowledge base›Block Global›Directive§ 3.3.1.47

use-proxy

Global

The list of proxies that sending goes out through
in the configuration this is a lineuse-proxyinside the block Global
The same name 1:Global<virtual-mta>— some of them are other settings, some are the same one
A chain of backups, not load balancing

The line names a list of <proxy> blocks that sending goes through. There is no default — without it the node connects to receivers by itself.

🔴 The list is strictly for backup, not for balancing. The manual says so literally: the second proxy is used only when the connection to the first failed, the third when both failed. Load cannot be distributed among proxies with this line.

Each name must be declared with a <proxy> block — otherwise the configuration will not pass the check.

It is incompatible with smtp-proxy-source-host — the second way to configure a proxy, and the two do not work together.

The main trap is setting it on the node and being surprised that some sending addresses behave differently. There are three levels, and either of the two lower ones silently overrides this one.
What the Hub does. It does not write it: the Hub’s gate is built on the line form — smtp-proxy-source-host in every sending address. The vendor recommends that form over this line, and within one address the two forms are incompatible. There are no <proxy> blocks in the configuration.

🔎 So a sending address has no spare proxy: the Hub spreads traffic across proxies with set pools (proxy-pool-…), not with a list.

Recommended values

The list is written in order of preference:

Value When
do not set it (default) the node goes out by itself
one proxy the usual case
a list a backup is needed in case of failure
The strictly-backup order, the requirement to declare each name with a block and the incompatibility with smtp-proxy-source-host come from the manual (§ 3.3.1.47).
Example configuration
# a list of backups, not distribution: the second only if the first fails
use-proxy mta-proxy-a, mta-proxy-b
Both names must be declared with <proxy> blocks below or above in the file.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
▲

Common mistakes and problems

what people get wrong and how it ends1 mistake▶

Expecting the list to balance load

our experience

What it costsThe list is strictly for backup. All traffic goes through the first proxy while it is alive, and no splitting between them takes place.
How to spot itThe load on the first proxy grows while the second sits idle.
How to do it rightDistribute on the proxy side, or with different lists for different sending addresses.
Compatibility
PowerMTA 6.0
described in the manual of this version · platform: any
The vendor does not state the first version for every directive — there is no note here. The name also appears in the 5.0 edition of the manual.
Reference data
Syntax
use-proxy PROXY-SERVER-LIST
Values
proxy block names separated by commas
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
Global, <virtual-mta>
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
The line is written at the root of the file, in the Global section, and goes to all sending addresses until they set their own. The most specific level is the line of the same name in the <proxy> block itself.
How to check on the node
Which proxy a message left through shows in the proxy columns of accounting — first find their numbers:
head -1 "$(ls -t /var/log/pmta/acct-*.csv | head -1)" | tr -d '\r' | tr ',' '\n' | grep -n '^dlvProxy'
The line number is the column number: lines are parsed by it, for example cut -d, -f1,N. Empty means the dlvProxy… fields are not selected in record-fields, and proxies are not visible in accounting. Constant work through the second proxy means the primary one is unavailable.
In the Hub
Cost of a mistake
disruptive: applying it interrupts the node
Scenarios
Sending through proxies