<acct-file>
The line sets the permissions with which the engine creates a new accounting file. The default is no, that is, the file is accessible only to its owner.
There is one reason to enable it: accounting is read by a program running as another user. Your own collector, an export to storage, someone else’s monitoring agent.
But it is the crudest way to solve the task. 644 permissions on the whole file give read access to every user of the node, not to the one who needs it. It would be more precise to set up a shared group and group permissions — but the directive has no such setting.
What exactly gets opened is worth remembering. Accounting holds recipient addresses, message subjects with the corresponding field set, and receiver responses. These are personal data and your clients’ business correspondence.
The line does not touch files already created — only new ones.
The main stream arrives via webhook, and the “Accounting stats” module parses the accounting files on the node itself, connecting over SSH with the node’s account — there is no need to open them to everyone for that. There is nowhere for a third-party collector on the node to come from for us.
If such a task appears, it is better to grant access through a group with system tools than to open the file to everyone with this line.
The answer is almost always “no”:
| Value | When |
|---|---|
| no (default) | always |
| yes | accounting is read by a program running as another user, and a group cannot be set up |
Anonymization does not replace this decision, but it lowers the cost: privacy-policy with a hash leaves less in the file that you would hate to expose.
# someone else's collector reads the file as another user <acct-file /var/log/pmta/acct.csv> records d, b world-readable yes privacy-policy hmac-sha256 "KEY-32-BYTES-OR-LONGER" </acct-file>
what people get wrong and how it ends2 mistakes▶
our experience
§ 3.3.11.13
1 relation
ls -l /var/log/pmta/acct*.csv
3 articles
◇What the node tells about itself and through which channelsSeven observation surfaces: the web monitor, the console in four formats, the log, accounting, accounting search, metrics and export to external analytics.◇Two inbound report processors and what to do with themBounces by message and complaints are parsed by two identically structured blocks; each has its own address list and its own pair of decisions about the message’s fate.◇Five ways for a queue to hand off a messageA queue does not have to use SMTP: it can write to a file, run a program, call over HTTP or discard.