大网数据广告活动
服务器运维问答

What is the significance of _domainkey.foo.com prefixes? (pic, mailo, k1, etc)

· 52CE 我爱测

I notice that every time I set up google apps, mailgun, mandrill or whatever I always have to set up domainkeys. That part makes sense - RSA, public/private, etc - I get that. Intuitively I would think there is a single standard …

问题原文

原帖链接 · coolaj86 · CC BY-SA 3.0

I notice that every time I set up google apps, mailgun, mandrill or whatever I always have to set up domainkeys. That part makes sense - RSA, public/private, etc - I get that.

Intuitively I would think there is a single standard for where to find SMTP domain keys, but instead it seems like one of these prefixes get picked at random: smtp k1 mx pic mailo.

Example:

  • smtp._domainkey.example.com (makes sense)
  • mx._domainkey.example.net (yup)
  • mailo._domainkey.example.org (why the o?)
  • k1._domainkey.foo.com (k for key? 1 for primary?)
  • pic._domainkey.bar.com (pic? what does that even mean?)

So I'm looking at my list of domains and it appears that only those 5 variations occur, but I'm not seeing a pattern.

  • Why isn't there just one standard prefix?
  • How does that querying server know which to query?
  • Isn't _ an illegal character?
  • And if the domainkey prefixes are arbitrary, why only arbitrary-ish?

I'd love to be pointed to some reading material as well as some short and sweet explanations if you have one on hand.

P.S. I've tried googling a little, but I don't know enough to figure out what my query should be. All that I see are tech support how to articles for specific email or hosting providers.

已采纳解答

原帖链接 · Tubeless · CC BY-SA 3.0

Here are short sweet answers that you requested:

How does that querying server know which to query?

That prefix is called selector. The receiving server know which DNS record to query by looking into the DomainKey-Signature header containing the cryptographic signature. Among many useful information, there are the selector and domain values. For example:

DomainKey-Signature: a=rsa-sha1; s=smtp; d=example.com; c=simple; q=dns; b=JOc8ZszniSbVoGVyOfAKCdLXyuU4zGffruD4doXSlEG2q8Ldyd00laHRNiYzRv+Z;

selector + "_domainkey" + domain = smtp._domainkey.example.com

Why isn't there just one standard prefix?

There isn't one standard prefix, because in some scenarios you want to have the option to configure multiple different DomainKeys records (e.g. you have two SMTP servers and you want each one to use it's own DomainKeys policy).

Isn't _ an illegal character?

As you can see, it's not :-)

And here are some reading materials ;-)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-11-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。