<acct-file>
Accounting records can be handed not to a file but to a program — then the block tag has a vertical bar and a command instead of a path. This line sets how often to try to start the program again if a start failed. The default is 5m.
The line has nothing to do with files and webhooks. The manual stipulates this plainly.
The reason for it is more serious than it seems. The pipe form has a documented danger: on a failed write to the program the node gives up trying until a configuration reload or a timeout. This line is that timeout — without it a broken consumer would mean losing all accounting until manual intervention.
The vendor advises keeping a regular file alongside — precisely because the gap between a failure and a restart does not preserve data.
The line is worth recognizing when investigating someone else’s configuration: a pipe is a sign of a home-made statistics collector, and with it there are almost certainly losses the node owner does not know about.
The interval is sized to how much data you can afford to lose:
| Value | When |
|---|---|
| 5m (default) | the program rarely crashes |
| 1m | it crashes often, and every minute of data is valuable |
And in any case — a file block alongside, otherwise the gap is lost entirely.
# pipe form: accounting is handed to a program <acct-file |/usr/local/bin/collector.pl> retry-interval 1m write-timeout 30s </acct-file> # and a file alongside — data for the gap between a failure and a restart <acct-file /var/log/pmta/acct.csv> records d, b </acct-file>
what people get wrong and how it ends2 mistakes▶
§ 12.1.1
§ 3.3.11.6
1 relation
grep -i "acct\|pipe" /var/log/pmta/log | tail -20
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.