A message can be signed twice, with different keys and under different identities. For this, each signing line has a twin with the second- prefix: second-dkim-sign, second-dkim-identity, second-dkim-headers and so on — twelve of them, a complete set.
What for. Sending on behalf of a client: the first signature is made with the client’s key, by the domain from its From; the second with yours, under your identity. The recipient sees both and can trust either: the client confirms the message is from them, you confirm it went out through you.
The sets are configured independently. In the manual’s example both signatures cover the feedback header for one recipient domain and differ in everything else.
# the client's signature by its domain and ours by our domain <virtual-mta 12345> domain-key 2017k1, esp.com, /etc/pmta/esp.esp.com.pem domain-key 2017-01, customer.com, /etc/pmta/2017-01.customer.com.pem <domain *> dkim-sign yes second-dkim-sign yes second-dkim-identity @esp.com </domain> </virtual-mta>
what people get wrong and how it ends2 mistakes▶
§ 10.3.4
our experience
1 relation
grep -n 'second-dkim' /etc/pmta/config grep -c 'DKIM-Signature' /var/log/pmta/pmta.log
3 articles
◇Do not send what will fail the check at the receiverThe node checks the SPF of its own mail before sending: if it fails, it bounces the message without waiting for someone else’s refusal.◇How the node signs messages and chooses a keyThe key is chosen by the sending domain from the headers, going through the declarations from top to bottom.◇A message header with which the submitting side adjusts the signatureFive parameters in X-DKIM-Options: selector, domain, signing identity, query method and key list.