Knowledge base

Console

Command
🔴 Node commands through a browser

Runs node console commands right from the browser — as if an operator logged into the machine and typed pmta.

The page link appears only while the PowerMTA service on the machine is running.

🔴 Message deletion and queue mode changes both go through here. Running commands is opened by the operator level in http-access; the monitor level is not enough for this page.

For a program there is POST /command — with the key from http-api-key.

The main trap is expecting an undo. Deleting messages from the queue is irreversible: what a command removed is no longer in the spool, and no monitor button will bring it back.
What the Hub does. It does not use the page: it sends the same commands to POST /command with the node key — with its own target check, a coverage preview and an entry in the operations log.
Recommended values

What question the page answers:

Question This one or not
run a command without logging into the machine yes — the operator level
run it from a program no — POST /command
who ran what through the monitor no — the request log, if http-log-requests is on
The page’s purpose, the condition for it appearing and the operator level for commands come from the manual (§ 5.2, § 3.3.1.58.3); the /command endpoint is § 8.4. The split of questions is ours.
Example configuration
# the same from a program: a command and a key
curl -s -H 'X-API-Key: KEY' 'http://127.0.0.1:8080/command' -F command='show status' -F format=json-text
json-text returns the same text as the console page, wrapped in JSON.
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
See who the page is open to and whether requests are logged:
grep -n 'http-access' /etc/pmta/config
grep -n 'http-log-requests' /etc/pmta/config
The page is open to addresses with the operator and admin levels. Exchanges with the monitor are not logged by default — for a trail, turn on http-log-requests.
In the Hub
Cost of a mistake
dangerous: effects outlast a rollback
Scenarios
Emergency stop · Node security