Knowledge base

PMTA knowledge base›Block <domain>›Directive§ 3.3.10.109.1

discard-as-bounce

<domain>

Whether to count discarded messages as bounces or deliveries
in the configuration this is a linediscard-as-bounce falseinside the block <domain>
Which letter a discarded message gets in accounting

It works for a queue of the discard type (type) — the one that discards messages. It discards them but writes a record to accounting, and this line decides which one.

The false default records them as deliveries (d). The default was chosen this way for a reason: from the node’s point of view the job is done, and the message left the queue without an error.

true records them as bounces (b). That is more honest if a discard queue plays the role of a black hole for known-undeliverable mail: in reports these messages will stand next to real bounces rather than next to delivered ones.

The main trap is that the default inflates deliverability. Messages nobody received are counted as delivered. On a small volume this goes unnoticed, but a stub queue for a test domain can raise the rate by several percent and make all deliverability statistics useless.
What the Hub does. It does not write it: it creates no discard queues. If such a queue appears, it should be set to true — the Hub calculates deliverability from accounting records and does not want a discarded message in the delivery numerator.
Recommended values

true is almost always the right choice. It does not prevent discarding messages but keeps them out of the delivered ones.

The default is kept deliberately and rarely. It is appropriate where discarding is regular delivery — for example, a sink queue for messages processed elsewhere.

The line does not cancel the record itself. Accounting happens with any value; the choice is only between the delivery letter and the bounce letter.

The “almost always enable it” rule is ours. From the manual here are the default, both accounting letters and the fact that the line applies only in a discard queue.
Example configuration
# a dead-end domain: we discard messages but do not record them as deliveries
<domain undeliverable.example.com>
    type discard
    discard-as-bounce true</domain>
Without the second line, these messages will get into accounting with the delivery letter and raise the deliverability rate without reaching a single recipient.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
▲

Common mistakes and problems

what people get wrong and how it ends2 mistakes▶

Leaving the default on a stub queue

our experience

What it costsDiscarded messages get into accounting as deliveries and raise the deliverability rate. The report gets better the more messages nobody received.
How to spot itDeliverability went up with no changes in sending.
How to do it rightSet true — the records will stay, but they will be counted as bounces.

Setting it for a queue of another type

§ 3.3.10.109

What it costsThe line is ignored entirely: the discard section applies only in discard queues. Yet it is visible in the settings output and looks like it works.
How to spot itThe line is set, but the record type in accounting has not changed.
How to do it rightRemove it from blocks with another queue type.
Compatibility
PowerMTA 6.0
described in the manual of this version · platform: any
The vendor does not state the first version for every directive — there is no note here. The name also appears in the 5.0 edition of the manual.
Reference data
Syntax
discard-as-bounce <boolean>
Values
yes or no; true and false are accepted on a par with them
Default
false § 3.3.10.109.1
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
<domain>
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
The value merges across <domain> blocks from general to specific: the best-matching block wins, not the last one in the file. In a queue of another type the line is ignored — the manual says this about the whole discard section. It is picked up by pmta reload.
How to check on the node
The queue settings command prints the value; which letter records are written with is visible in accounting itself:
pmta show settings undeliverable.example.com/vmta1 | grep -i discard-as-bounce
grep -c ',undeliverable.example.com,' /var/log/pmta/acct-*.csv
Records of discarded messages are in accounting with any value — only the record type changes. The Hub creates no discard queues.
In the Hub
Cost of a mistake
reversible: harms only while it is set
Scenarios
Troubleshoot deliverability · Collect telemetry