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

Is there a standard DNS record to indicate the IMAP server for a domain?

· 52CE 我爱测

After some searching I've come up totally empty handed on if there is any standard (or non-standard for that matter) specification or best practice for specifying the IMAP server for a domain name. I.e. if I have an account such …

问题原文

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

After some searching I've come up totally empty handed on if there is any standard (or non-standard for that matter) specification or best practice for specifying the IMAP server for a domain name. I.e. if I have an account such as "[email omitted]", and I wish to read my mail via IMAP, is there any DNS record which would indicate to my mail client which mail server it should be contacting? I've never seen anything like this, and virtually all email setup instructions I've seen include an exact host name for IMAP, e.g. "mail.example.com" or "imap.example.com". I guess the assumption is that the employees or other users of example.com can find out what server to use from their administrator. However if example.com were to have thousands of accounts, this would become burdensome. It would seem very useful to just enter your email address "[email omitted]" and have it look up the IMAP server name in DNS based on the email's domain name (not dissimilar to how an MX record works for SMTP).

Anyone heard of anything like this?

已采纳解答

原帖链接 · HBruijn · CC BY-SA 4.0

From a DNS perspective you have SRV DNS records which allow the use of DNS for publishing services and service discovery. Their main use is to allow services to run easily on non-standard ports and to reduce the configuration burden when setting up clients.

A SRV record has the following form:

_Service._Protocol.Name. TTL Class SRV Priority Weight Port Target

and one for IMAP is defined in RFC 6186 and would look like:

_imap._tcp.example.com. 3600 IN SRV 0 10 143 my-imap-host.example.com.

or

_imaps._tcp.example.com. 3600 IN SRV 0 10 995 my-imaps-host.example.com.

Most email clients don't specifically look for an IMAP server first though, but use auto discovery to derive email client settings from the email address a user enters.
If a user enters [email omitted], depending on the client those typically involve either

  • an _autodiscover._tcp.example.com. SRV record such as used by MS Exchange and Outlook
  • an actual host called autoconfig.example.com.
  • or more

A pretty good write up is found here : https://web.archive.org/web/20210402044628/https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration

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

资料来源与适用范围

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

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

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