Global
The value is the From header line for reports the node generates. It does not support substitutions: the text goes into the header verbatim.
There are two lines with this purpose, and they differ in exactly this. The neighboring dsn-failed-from-template can substitute nine values of the original message — the node name, the sender, the recipient, the subject and the rest. This one can do nothing of the kind.
There is no point keeping both in the configuration: which one wins, the manual does not specify.
No default is named either — if it is not written, the engine uses its own.
The second half: the line is silent about substitutions. By writing ${hostname} in it, you will get exactly those characters in the header — with no error and no warning.
What to set. A choice between two lines with the same purpose:
| Value | When |
|---|---|
| do not write it | reports are not generated, or the engine’s default is enough |
| a verbatim string | you need the same report sender every time, and no substitutions |
If you want the node name in the display name, you need the neighboring line with substitutions, not this one.
# verbatim: substitutions do not work here custom-dsn-from-header "Postmaster <foobar@there.com>"
what people get wrong and how it ends2 mistakes▶
§ 3.3.1.29
our experience
1 relation
grep -n 'custom-dsn-from-header\|dsn-failed-from-template\|suppress-local-dsn' /etc/pmta/config
3 articles
◇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.◇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.◇Address lists — named and unnamedA list of addresses, domains, patterns or hashes; a named one is attached by directives such as suppression, an unnamed one lives inside an inbound mail processor.