Knowledge base

test config

critical

Configuration parse check
Learn about an error before applying, not after

Checks the syntax of the configuration file without reloading the running configuration.

This command belongs before every apply. It catches grammar violations — Error in line 11 of /etc/pmta/config: argument missing — but not a line written in the wrong block: that one parses fine and applies silently.

The main trap is treating “no errors” as a meaning check. The command checks only syntax: a directive in someone else’s block or a typo in a domain name passes it without a word.
What the Hub does. It calls it over SSH before every reload: it writes the files, checks the configuration with this command and on error puts the previous files back without reloading. The Hub counts a zero exit code with no error word in the output as success.
Recommended values

When to call it:

Question This command or not
is there a syntax error yes
what applies after the apply no — show settings
apply the configuration no — reload
The purpose and the error example come from the manual (§ 6.3.40). The analysis of meaning errors is ours.
Example configuration
# check first, apply only then
pmta test configpmta reload
If the first line prints an error with a file line number, the second one is not run.
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
Check the exit code:
pmta test config; echo "exit=$?"
The Hub judges by the code and by the absence of the word “error” in the output — more reliable than reading the text.
In the Hub
Cost of a mistake
safe: a wrong value breaks nothing
Scenarios
Configuration lifecycle
Priority
critical