Knowledge base

How an accounting record is structured

critical

accounting record model
Record types and field composition

The general structure of accounting records: the record type — d delivery, b bounce, t temporary error, tq queue temporary error, r reception, f complaint, rb and rs — a bounce and a status that arrived by mail — and fields whose set is configurable. By default only d and b are written.

The record type decides what the line is about, the field set decides what is in it. Both are set in the accounting block, and both affect size: there are as many delivery records as delivered recipients.

The main trap is expecting temporary errors in default accounting. Without an explicit records only deliveries and bounces are written: there will be no string of deferrals in the file, and “the message took three days” cannot be reconstructed from accounting.
What the Hub does. It reads the accounting stream in full: the webhook carries d, b, rb, t and f records, and all the analytics are built on them.
Recommended values

Record types:

Type What the line is about By default
d delivery yes
b bounce yes
t, tq temporary error of a recipient, of a queue no
r message reception no
f complaint no
rb, rs a bounce and a status that arrived by mail no
The record types and the “only d and b” default come from the manual (§ 12.2). The table is ours.
Example configuration
<acct-file /var/log/pmta/acct.csv>
    records d,b,t    record-fields d *,timeFirstAttempt
</acct-file>
Record types are listed with the records line, the field set with record-fields for each type.
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
See which record types the node writes:
cut -d, -f1 /var/log/pmta/acct-*.csv | sort | uniq -c
The first column is the record type; whatever is missing from the count, the node does not write.
In the Hub
Cost of a mistake
safe: a wrong value breaks nothing
Scenarios
Troubleshoot deliverability · Collect telemetry
Priority
critical