<source>critical
The default is false. The point of the directive is to keep the X-DKIM-Key header in the message when sending to an outside server, that is, to send the private signing key to the recipient.
The manual accompanies it with a warning set in bold: with true the private key ends up in the delivered message, this is a security risk, and keeping false is strongly recommended. No other source block directive carries such a warning.
Formally the directive is independent of the permission to read the header — the manual stresses this separately. In practice this independence gives nothing useful here: the combinations where true would be appropriate have no use.
This cannot be undone: a key that left in a delivered message counts as compromised, and the only cure is rotation — with the accompanying delay in the receiving servers’ DNS caches.
What to set. There is essentially no choice here:
| Value | When |
|---|---|
| no (default) | always |
| yes | there is no such case |
If you need to see the key a message arrived with, look at it on the submitting side — where the message was assembled — rather than letting it out to the recipient.
# the default value, and there is no reason to change it <source 0/0> retain-x-dkim-key false</source>
what people get wrong and how it ends2 mistakes▶
§ 3.3.7.47
§ 3.3.7.47
2 relations
grep -rn 'retain-x-dkim-key' /etc/pmta/
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.◇The group that grants management rightsMembership in the pmta group gives an unprivileged user the right to call the node’s commands and use submission.◇How the node selects a source and combines its settingsA connection falls under all source blocks whose addresses cover it, and they act merged — the narrow one overrides the wide one; named blocks are attached only by direct reference.