Knowledge base

PMTA knowledge base›Block Global›Directive§ 3.3.1.30

dsn-failed-subject-template

Global

The subject template in failure reports
in the configuration this is a linedsn-failed-subject-templateinside the block Global
The subject by which the report is recognized

The value is the subject line. The same nine values of the original message are substituted into it as into the report body: dsn-failed-body-template-from lists them in full.

The point of the setting is recognizability. The report reaches a person or a machine parser, and the subject decides whether it is told apart from other mail: the original message’s subject in it helps link the report to the mailing.

The manual names no default — if it is not written, the engine uses its own.

The main trap is the original message’s subject in the report subject. It is convenient for a person and dangerous outside: the report goes to the sender, and the mailing’s subject in it passes through other people’s servers and ends up in other people’s logs.

The second half is the same as with the body template: the manual writes the substitution name in two ways, and a wrong spelling causes no error but stays in the subject as is. Check it with a message.

What the Hub does. It does not write it — and the line cannot show up: report generation is turned off by suppress-local-dsn in all submission sources.
Recommended values

What to set. The subject solves one task — recognizability:

Value When
do not write it reports are read by a machine by standard fields, not by subject
your own string without substitutions reports are read by a person, and it is enough to recognize them as reports
a string with the original message’s subject you need to link a report to a specific mailing by eye

The third is the most convenient and the worst in terms of what goes outside.

The purpose and the shared set of substitutions with the body template come from the manual, § 3.3.1.30. No default is named there. The analysis of the subject going outside is ours.
Example configuration
# the original message's subject helps link the report to the mailing
dsn-failed-subject-template "Email failed, Re: ${subject}"
The substitution takes the original message’s subject. It will also pass through other people’s servers along with the report — worth keeping in mind if the subject says something about the mailing’s content.
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▶

Putting the mailing subject into the report subject without thinking

our experience

What it costsThe report goes outside and carries the mailing’s subject through other people’s servers and into other people’s logs. For a promotional mailing this is usually unimportant, for a transactional one — not at all.
How to spot itReport subjects show message subjects with personal details.
How to do it rightKeep an identifying string in the report subject without substituting the original message’s subject.

Misspelling the substitution

§ 3.3.1.31

What it costsThere will be no error: the substitution will stay in the subject as is, and the recipient will see curly braces instead of the value.
How to spot itThe substitution name is visible in the subject of the received report.
How to do it rightCheck with a message and keep the spelling that worked.
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
dsn-failed-subject-template "<template>"
Values
a subject line with substitutions
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
Global
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
The directive is written at the root of the configuration file and applies to the whole node: there is no block for it and no inheritance either. Different subjects for different senders cannot be set.
How to check on the node
The line is visible in the configuration, but it has to be checked with a message:
grep -n 'dsn-failed-subject-template\|suppress-local-dsn' /etc/pmta/config
If report suppression is on, the line will not show up. If it is off — send a message to a non-existent address and look at the subject of the arriving report: a wrong substitution will stay in it as is.
In the Hub
Cost of a mistake
safe: a wrong value breaks nothing
Scenarios
Receiving inbound mail