问题原文
原帖链接 · Lenne · CC BY-SA 4.0
We're having trouble creating the long TXT record for the DKIM key on the web interface on our hoster.
Each line can only accept 256 characters.
We tried multiple lines, then tried adding (" at the first and ") after the last as some suggest. Neither works.
Then we tried making a cname to a record on another hoster, where we can make the DKIM TXT records.
But now the webinterface complains about illegal name in the CNAME record.
mail._domainkey.example.com TXT is ok
mail._domainkey.example.com CNAME is not ok
mail.domainkey.example.com CNAME is ok, but not what we want.
Is the webinterface just determined to drive us crazy, or is it really "illegal" to have underscores in CNAME?
社区高分解答
原帖链接 · Sven · CC BY-SA 4.0
Hostnames may only contain [0-9], [a-z], -, so the underscore is not valid in a hostname. Note that a TXT record is not a hostname, and this restriction doesn't apply for it. (- may not be used as the first character either, so mail.-domainkey.our.dom wouldn't be valid.)
https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_hostnames
When a CNAME is used as a hostname, the above restrictions apply.
But it appears a CNAME is not considered a hostname in the DKIM context and in that case, _ should be a valid part of a CNAME entry. See Underscore in CNAME required by SES not allowed by registrar [closed]
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
