Knowledge base

PMTA knowledge base›Block Global›Directive§ 3.3.1.59.4

log-file-world-readable

Global

Whether to make the log readable by all users on the system
in the configuration this is a linelog-file-world-readable falseinside the block Global
Who on the node will read the log

With the value true the line makes the engine’s logs readable by any user on the machine. The default is false.

It is worth knowing what exactly is exposed. With the detail switches on, the log contains sender and recipient addresses (log-commands writes the whole SMTP conversation), command contents, and with log-data every byte of correspondence in two forms at once.

The web monitor log is exposed too. It holds addresses denied access and, with http-log-requests, calls to the management interfaces.

There is one reason to enable it: the log is read by a service running as another user. And the same caveat applies as for accounting files: group permissions are more precise, but the directive has no such setting.

The main trap is enabling it on a node that has accounts for people. A detailed log is your clients’ correspondence and the layout of your protection in one file, open to everyone.
What the Hub does. It does not write it — the logs stay closed.

We have no need to read them from outside: telemetry arrives via webhook, and troubleshooting goes over SSH from the administrative account.

Recommended values

The answer is almost always “no”:

Value When
false (default) always
true the log is read by a service running as another user, and a group cannot be set up

Before enabling it, look at which detail switches are set: with log-commands and log-data the price is different.

The false default and the scope (the logs the engine creates) come from the manual (§ 3.3.1.59.4). The list of what ends up in them with details enabled is ours.
Example configuration
# a collection service reads the log as another user
log-file /var/log/pmta/log
log-file-world-readable true
It is worth checking whether log-commands or log-data are enabled alongside: with them the correspondence is exposed in full.
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▶

Opening the log without looking at the detail switches

our experience

What it costsWith log-commands the log holds the whole SMTP conversation — addresses, subjects, receivers’ responses. By opening the file to everyone, you open up the correspondence.
How to spot itThe node has details enabled and world-readable true set.
How to do it rightEither close the log or turn off the details; better both, and grant access through a group.
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
log-file-world-readable <boolean>
Values
yes | no | true | false
Default
false § 3.3.1.59.4
Applying
reload, no restart needed
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
There is no inheritance: the line is written at the root of the file, in the Global section, and concerns all node logs at once — the engine’s, the monitor’s and SNMP. One of them cannot be opened selectively.
How to check on the node
The check is direct — we look at the permissions:
ls -l /var/log/pmta/
Permissions like -rw-r–r– mean the line is on. Permissions are set when a file is created: existing files keep their previous ones.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Node security