A node learns the fate of a message in two ways. In the conversation — and that gets into accounting by itself. By a message later — and this is what the processors are needed for.
There are two of them, and they are structured the same way. <bounce-processor> parses asynchronous bounces, <feedback-loop-processor> parses complaints. Each has its own address list, its own pair of decisions about the message’s fate and its own option to nest patterns.
Four lines decide everything:
| Line | Decides |
|---|---|
| deliver-matched-email | what to do with what was recognized (default — discard) |
| deliver-unmatched-email | what to do with the rest (default — deliver) |
| forward-unmatched-to | where to forward what was not understood |
| forward-errors-to | where to forward what parsing broke on |
🔴 Two lines are connected in a non-obvious way: forwarding what was not understood works only with deliver-unmatched-email true. Otherwise the message is discarded earlier, and the forwarding address is useless.
Receiving is a separate question. A processor decides the fate of an accepted message. For the message to be accepted, relay-address and an MX record are needed; without them the report is rejected by anti-relay and never reaches parsing.
🔴 And we have deliver-unmatched-email no in both. This means everything the processor did not recognize is discarded silently: aggregate DMARC reports that we ourselves requested with the rua record, service messages to abuse@ and everything written to postmaster@. The fix is a pair of lines: true plus forward-unmatched-to to a live mailbox.
The mechanism has no values of its own — they are set by four lines in each of the two blocks:
| What is needed | How |
|---|---|
| accept the message | relay-address plus an MX record |
| catch it with a processor | an address list inside the block |
| record the data | happens by itself, as rb and f records |
| not lose everything else | deliver-unmatched-email true plus forwarding |
# receiving, parsing and keeping everything else are three different things relay-address /^bounce@bounce\./ <bounce-processor> deliver-matched-email no deliver-unmatched-email true forward-unmatched-to postmaster@example.com <address-list> address /^bounce@bounce\./ </address-list> </bounce-processor>
what people get wrong and how it ends2 mistakes▶
our experience
§ 3.3.3.1
5 relations
Parsing bounces that arrive as messagesThe first of the two processors and its role in delivery analysis. § 13.6Complaints parsed by the node — and they are parsed secondThe second of the two processors: complaints from mailbox provider users. § 13.7
deliver-unmatched-email<bounce-processor>The mechanism in which this line is one of four decisions about a message’s fate. § 3.3.3.1deliver-matched-email<bounce-processor>The mechanism in which this line is one of four decisions about a message’s fate. § 3.3.3.2forward-unmatched-to<bounce-processor>The mechanism in which this line is one of four decisions about a message’s fate. § 3.3.3.4forward-errors-to<bounce-processor>The mechanism in which this line is one of four decisions about a message’s fate. § 3.3.3.5deliver-unmatched-email<feedback-loop-processor>The mechanism in which this line is one of four decisions about a message’s fate. § 3.3.4.1deliver-matched-email<feedback-loop-processor>The mechanism in which this line is one of four decisions about a message’s fate. § 3.3.4.2
cut -d, -f1 /var/log/pmta/acct-*.csv | sort | uniq -c
3 articles
◇What to do with an accepted messageWhat the node does with an accepted inbound message: forwards it, writes it to a file, discards it, passes it to a program or parses it as a bounce or complaint.◇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.◇Who is allowed to submit mail and for whom to accept itOut of the box, the node accepts submission only from the machine itself; two different questions — “who can send through us” and “for whose addresses we accept mail” — are answered by different directives.