Knowledge base

PMTA knowledge base›Block Global›Directive§ 3.3.1.58.21

http-log-data

Globalrestart required

Whether to log the content of exchanges with the web monitor
in the configuration this is a linehttp-log-data falseinside the block Global
Detailed exchange logging — for the duration of an investigation

With true, the monitor logs the exchange with the client in more detail than http-log-requests. Off by default.

The line is diagnostic, not permanent. It is enabled when an API client gets a response other than the one it expects and you need to see what exactly went out and came in.

🔴 The detailed log also includes what the client sent. Keys, the content of configuration edits and commands go through the monitor. A log with such records must be treated as secret storage and handled accordingly — and better switched off right after the investigation.

The manual’s wording coincides word for word with the neighboring line — “whether web monitor data exchanges are logged” — and only the addition “more verbose” tells them apart. It looks like a vendor typo in one of the two sections.

The main trap is leaving detailed logging on. It is both voluminous and contains what should not be in a log. A forgotten line turns the monitor log into a file that cannot be shown on a par with the others.
What the Hub does. It does not write it. If you need to find out why a node answers the Hub differently than expected — enable it for the investigation and remove it right away, remembering that the management key will end up in the log.
Recommended values

Only for the duration of an investigation:

Value When
false (default) always
true investigating an unclear API response, for minutes

After the investigation, review the log and decide whether it should be deleted: it may contain the key.

The default false and the fact that it is more detailed than the request log are from the manual (§ 3.3.1.58.21). The warning about secrets in the log and the coincidence of the two sections’ wording are ours.
Example configuration
# for the minutes of an investigation, then remove — the key will end up in the log
http-mgmt-port 1000
http-log-data true
The line is removed right after the investigation. The log for that period is worth reviewing separately.
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 ends2 mistakes▶

Leaving detailed logging on after the investigation

our experience

What it costsThe log grows and fills with what should not be in it — keys and the content of configuration edits.
How to spot itRequest headers are visible in full in the monitor log.
How to do it rightSet false back, restart the monitor and decide what to do with what has already been logged.

Enabling detailed logging instead of the request log

our experience

What it costsFor the question “who did what”, http-log-requests is enough, while detailed logging adds volume and secrets for no benefit.
How to spot ithttp-log-data is permanently on, while http-log-requests is not.
How to do it rightSwap them: keep request logging as the permanent one.
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
http-log-data <boolean>
Values
yes | no | true | false
Default
false § 3.3.1.58.21
Applying
a service restart is required
Queue
will not touch what is already queued
Where to write it
Global
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
No inheritance: the line is written at the root of the file, the Global section, and applies to the whole management interface.
How to check on the node
We open the monitor log and make one request:
tail -f /var/log/pmta/pmtahttp.log
With detailed logging on, the lines show the content of the exchange, not just the fact of the call. That is the sign the line has taken effect.
In the Hub
Cost of a mistake
safe: a wrong value breaks nothing
Scenarios
Node security