The <acct-file> block is the boundary between the engine and everything downstream, the Hub included. It answers five questions, and those answers have no other source.
| Question | Line |
|---|---|
| which events | records — eight types |
| which fields | record-fields, plus message headers via header_NAME |
| where to | a path in the tag, a pipe or http-webhook-url |
| how files rotate | move-to, move-interval, max-size, delete-after |
| what to hide | privacy-policy |
🔴 A field that was not selected cannot be recovered by any processing downstream. It produces not an error but emptiness — and that is the worst kind of loss: a silent one. In exactly the same way, a record type that was not selected is an event that never happened as far as analytics is concerned.
Hence the rule for the fleet: the field set on the nodes must be verified, not assumed. The receiver expects a certain composition, and nothing checks that the node is configured to write it.
Both lines understand negation — *,!field and !name — so the configuration can be written as “everything except” rather than as a list. This holds up noticeably better when new fields appear in later versions.
Telemetry is a webhook to our address: five record types (d, b, rb, t, feedback-loop), each with the standard field set, deliveries and bounces also carrying the first-attempt time, the time in queue and the retry count, complaints the Feedback-ID header. One batch a minute, 1 MB ceiling. This is the source of every fleet dashboard.
Files on the node come from the block <acct-file /var/log/pmta/acct.csv>, and the engine appends the date to the name: acct-2026-09-15-0000.csv. They hold deliveries and both kinds of bounces (d, b, rb) with the same extra fields, a 25 MB ceiling and a one-week retention. The “Accounting statistics” module reads them.
The files are not moved: the move-interval 5m line, which silently did nothing without move-to, was removed on Aug 29, 2026. A new file starts with a new date in the name, and within a day when the size ceiling is reached.
The mechanism has no values of its own: the block’s lines set them.
| What is configured | With what | Default |
|---|---|---|
| record types | records | d,b |
| fields | record-fields | all |
| format | the extension in the path | CSV, .json gives NDJSON |
| anonymization | privacy-policy | do not anonymize |
| retention | delete-after | 8 days |
There can be several blocks, and that is the main technique: different questions, different files.
# two accounting blocks: telemetry and a safety net — different questions, different files <acct-file /var/log/pmta/mtahub-webhook.json> records d, b, rb, t, feedback-loop record-fields d * http-webhook-url https://hub.example.com/api/telemetry/pmta/7 http-webhook-max-interval 1m </acct-file> <acct-file /var/log/pmta/acct.csv> max-size 25M delete-after 7d </acct-file>
what people get wrong and how it ends3 mistakes▶
our experience
our experience
§ 3.3.11.5
3 relations
Delivered — the record everything is counted byThe most frequent record in the stream: a message was delivered to the recipient. § 3.3.11What the node tells about itself and through which channelsOne of the three observation surfaces of a node — the one history comes from, rather than current state. § 1.4
records<acct-file>The first of the two lines that determine what gets into accounting at all. § 3.3.11.11record-fields<acct-file>The second of the two lines that determine what gets into accounting. § 3.3.11.12privacy-policy<acct-file>Anonymization is applied to this stream’s records before they are written to disk. § 3.3.11.16queue-filter<acct-file>Narrows the stream of records by queue name before they are written to the file. § 3.3.11.5map-header-to-field<acct-file>Replaces the contents of a standard field in this stream’s records. § 3.3.11.10delete-after<acct-file>How long this stream’s closed files live. § 3.3.11.1
head -1 "$(ls -t /var/log/pmta/acct-*.csv | head -1)"
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.◇How an accounting record is structuredHow an accounting record is structured: the record type in the first column, then the fields, whose composition is configurable.◇Exposing metrics to a collectorExposing the node’s metrics to an external collector in its format.