DKIM (DomainKeys identified mail) is an e-mail authentication standard-the domain name key identifies the message standard, which can be used to determine whether a message is spam.
It works by generating a private key (private key)/public key pair, storing the public key as a TXT record in the DNS server, and selecting the corresponding message field when sending the message (for example, from, to, Subject) generates signature information from the private key and sends it after attaching it to the header of the message. When the destination mail server receives the message, it obtains the public key from the DNS query based on the sender's domain name, and then uses the public key to verify that the signature information in the message header is legitimate.
We successfully sent the DKIM signed message through C # code, the following steps:
1. Generate private key with tools provided by dkimcore.org and records containing public keys that need to be added to DNS
A) Open http://dkimcore.org/tools/, in Domain name, enter the domain name to send a mailbox, click Generate;
B Assuming the domain name is cnblogs.biz, we will get three data--selector (1362200600.cnblogs), Private key, as shown in the following figure. DNS Records (the name is 1362200600.cnblogs._domainkey, and the value is the part of the v=dkim1 that ends with a colon [does not contain a colon, not shown in the figure]).
2. Add TXT record to DNS server
This article URL address: http://www.bianceng.cn/Programming/csharp/201410/45475.htm