<acct-file>
The line selects records by the queue field: a match with a non-negated name — the record is written, a match with a negated one (with ! in front) — it is not. By default there is no selection, all records are written.
🔴 Filtered-out records are lost forever. The manual singles this out in a separate paragraph: a record that does not pass the selection goes nowhere — unless another accounting block writes it. This is not hiding in the output, it is data never coming into existence.
The selection does not apply to all record types. Only d, b, t and tq have the queue field; complaints, bounces by message and receptions (f, rb, rs, r) are written unconditionally, all of them.
Matching goes in the order in which the names are listed — as in an access list: the first match wins.
The queue name must be syntactically valid. The domain must be complete and not reserved (that is, not {feedbackLoop} and not {bounceProcessor}); the sending address, if given, must be a syntactically valid name or {default}. Whether such a sending address actually exists, the engine does not check. A name without a sending address means {default}: foo.com reads as foo.com/{default}.
If all names are negated, no record will pass.
If such a task ever comes up (for example, giving a client accounting only for their domains), it should be done with a second accounting block, not with selection in the main one: then the full stream is preserved.
Before selecting, create a second block without it:
| Entry | What it means |
|---|---|
| foo.com | only foo.com/{default} — almost always not what was meant |
| foo.com/* | all sending addresses of this domain |
| !*/vmta3 | everything except this sending address |
| [*.]b.com/* | the domain and its subdomains |
🔴 What is filtered out cannot be recovered. Check the line before applying, not after.
# selection in the main stream is dangerous — create a separate block for the client <acct-file /var/log/pmta/acct.csv> records d, b, t </acct-file> <acct-file /var/log/pmta/client-a.csv> records d, b queue-filter [*.]client-a.com/*</acct-file>
what people get wrong and how it ends3 mistakes▶
§ 3.3.11.5
§ 3.3.11.5
§ 3.3.11.5
2 relations
cut -d, -f1,4 /var/log/pmta/client-a.csv | sort | uniq -c | head
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.◇A license for a fleet, not for a serverThe license is not bound to a server: it is installed on as many machines as the instance limit allows, and the nodes send volume statistics to the vendor every hour.◇How the node selects a source and combines its settingsA connection falls under all source blocks whose addresses cover it, and they act merged — the narrow one overrides the wide one; named blocks are attached only by direct reference.