<acct-file>criticalset by the Hub
The line sets the set of columns for one record type, and it is written separately for each type. The default is *.
The star is not “all fields” but the default set. The directive description says “all”, but the field tables are more precise: * gives the fields marked with a star. The first-attempt time, the retry count, encryption and proxy fields are not in it — they are named explicitly.
The list syntax is simple and worth memorizing whole:
| Entry | Meaning |
|---|---|
| * | the default fields for this type |
| timeLogged,orig,rcpt | only the listed ones |
| *,!orcpt | the default fields except the one named |
| *,header_Message-Id | the default fields plus a message header |
An arbitrary header is header_NAME. This is how anything you put in the message yourself gets into accounting: a campaign identifier, the recipient’s identifier in your database, anything. It is the only way to tie an accounting record to your side.
A field not selected cannot be recovered. Downstream it produces not an error but emptiness, and no processing will bring it back.
Some fields are unlocked by other lines. The first-attempt time appears only with track-time-first-attempt; the user-string text only if the userString field is listed.
The choice is deliberate: a narrow set would save little, while questions to telemetry keep piling up over time. The batch is parsed by our receiver, and extra fields cost it nothing.
Start with the asterisk and narrow it only for a measured reason:
| Value | When |
|---|---|
| * (default) | almost always |
| *,header_NAME | a link to your own database is needed |
| *,!field | one field gets in the way — a long one, for example |
| an explicit list | an external requirement on the data composition |
Each record type has its own list — the line is repeated once per type.
# the default set for each type, plus the complaint header for feedback-loop <acct-file /var/log/pmta/mtahub-webhook.json> records d, b, rb, t, feedback-loop record-fields d * record-fields b * record-fields f *,header_feedback-id </acct-file>
what people get wrong and how it ends3 mistakes▶
our experience
§ 3.3.11.12
our experience
4 relations
records<acct-file>Columns are set for the record type selected by that line. § 3.3.11.12
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.◇The telemetry contractOne block describes the accounting output in full: which record types, which fields, where they go, how files rotate and what gets anonymized.◇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.