<source>
The default is no. There are three values, and the third is not boolean:
no — leave it alone. yes — add one if there is no header; an existing one is not rewritten. override — set its own in any case.
The Date header is mandatory under the message standard, and receivers take its absence badly. But the submitting platform usually sets it itself, so the line is insurance, not a working mechanism.
It does not work with merging. The manual says so directly: automatic date addition for messages assembled by merging is not supported; there the same task is handled by the *date variable.
The line would be useful as insurance on a node where a third-party platform of unknown quality submits — but that is also where it is more dangerous: override will overwrite a date the sender set deliberately.
What to set. The three values solve three different tasks:
| Value | When |
|---|---|
| no (default) | the submitting platform sets the date itself — the usual case |
| yes | submission is mixed, and some messages arrive without a date |
| override | the sender’s date is known to be wrong: a skewed clock, an old queue on their side |
The third value is a last resort: it erases the sender’s intent and, paired with the delivery time, produces a message dated after the fact — backdating in reverse.
# the date is added only to messages that arrived without one <source 0/0> add-date-header yes</source>
what people get wrong and how it ends2 mistakes▶
§ 3.3.7.1
our experience
1 relation
grep -n 'add-date-header\|date-header-time' /etc/pmta/config /etc/pmta/virtualhost.txt
3 articles
◇How a message gets into the engineSix described submission methods: extended SMTP, four language bindings and a directory the node watches on disk.◇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.◇Headers the sender uses to control deliverySix control headers let the submitting side choose a stream, tag a message with a job, set signing options and the key, the envelope identifier and the schedule; each is allowed separately and per source.