Knowledge base

Sending addresses that have a queue

/vmtas
Who is busy with what

Returns sending addresses that currently have mail in the queue, by number of recipients in descending order.

The call is GET /vmtas?format=json (or xml). The manual suggests taking one address’s queues through /queues with the queue=*/address-name parameter.

This is also a top: the length is set by http-default-max-items, ten lines by default.

It shows how addresses work, not their settings: an address without mail in the queue does not get here at all.

Access is decided by http-access based on the address the request came from — the monitor level is enough for reading. The key from http-api-key in the X-API-Key header grants full access from any address.

The main trap is looking here for all node addresses. An address with an empty queue does not get into the response: an idle one and a nonexistent one look the same — by their absence. This endpoint does not give a list of addresses defined in the configuration.
What the Hub does. It asks — the “PMTA monitoring” screen takes this endpoint together with /status, /queues, /domains and /jobs with the length maxItems=1000, that is, all addresses that have a queue, and adds the addresses the Hub created itself.
Recommended values

What to ask this endpoint:

Question This one or not
which addresses are busiest now yes
all addresses with mail in the queue no — show vmtas: the command defaults to “all”
one address’s queues no — /queues with queue=*/address-name
what happened yesterday no — that is accounting
The “only with mail in the queue” filter, the order, the list length and the way to take one address’s queues come from the manual (§ 5.9, § 3.3.1.58.23, § 6.3.21). The split of questions is ours.
Example configuration
# busy sending addresses and the queues of one of them
curl -s 'http://127.0.0.1:8080/vmtas?format=json'curl -s 'http://127.0.0.1:8080/queues?format=json&queue=*/vmta1'
The second line is what the manual calls sending address details: there is no separate endpoint for them.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
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.
How to check on the node
Compare the top with the full list in the console:
curl -s 'http://127.0.0.1:8080/vmtas?format=json' | head -60
pmta show vmtas
The command prints all addresses by default, while the endpoint’s response is the top; the difference in the number of lines is not a data mismatch.
In the Hub
Cost of a mistake
safe: a wrong value breaks nothing
Scenarios
Address warm-up