<acct-file>
The line takes the contents of a message header and puts it into a standard field of the accounting record — for one record type. Not set by default.
The difference from record-fields is fundamental. There the header is added as a new column (header_NAME), and the parsing program must know about it. Here it replaces an existing column — and a program that already reads it will get your value without a single change.
Several lines can be written for one field, and order matters: the first header found in the message is taken. If none is found, the field keeps its original value.
One header can be spread across several fields, and it will go into each.
The line does not work with the tq type — the manual notes this separately.
The line will come in handy when migrating someone else’s node where the statistics collector was written for a fixed set of columns and cannot be rewritten.
The order of lines is part of the setting:
| Entry | What it does |
|---|---|
| d header_x-uid rcpt | the header goes into the recipient field of deliveries |
| a second line for the same field | taken if the first header is not in the message |
| d header_x-uid orig | the same header also goes into a second field |
The tq type is not supported.
# a third-party collector reads the rcpt column, and it cannot be rewritten <acct-file /var/log/pmta/acct.csv> records d, b map-header-to-field d header_x-uid rcpt map-header-to-field d header_x-legacy-uid rcpt </acct-file>
what people get wrong and how it ends2 mistakes▶
our experience
§ 3.3.11.10
2 relations
head -3 "$(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.◇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.