How DKIM signs your mail
DomainKeys Identified Mail adds a cryptographic signature to each outgoing message. Your mail server signs with a private key, and receivers verify the signature with a public key published in your DNS. If the message was changed along the way, or was not sent by someone with the key, verification fails. This lets a receiver trust that the message really came through a system you authorized, and it is one of the two methods DMARC relies on.