用于识别电子邮件帐户类型的脚本
我需要帮助/指导来编写一个脚本,该脚本将通过地址查找邮箱的类型。 (例如:POP、IMAP 或 Exchange) 例如,我将输入: '[email protected]' 和响应将是“pop/imap”。
我相信这是可能的,因为我知道黑莓系统可以在配置电子邮件帐户时做到这一点,甚至智能手机也可以..
我尝试通过已知端口(如 110 等)使用 telnet 与服务器进行通信,但它不会不起作用,因为交换可以使用任何端口。
我更喜欢使用 javascript 来完成这项工作。
谢谢, 罗特姆
I need help / direction to write a script that will find the type of a mailbox by it's address. (such as: POP, IMAP or Exchange)
For example I'll type: '[email protected]' and the response will be 'pop/imap'.
I believe it is possible because I know blackberry systems for example can do it when you configure email accounts, or even smart phones can..
I tought trying to communicate with the server by known ports like 110 and so using telnet, but it won't work because exchange is able to use any port.
I prefer using javascript for this job.
Thanks,
Rotem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种选择是实施 Exchange 自动发现 协议,该协议专为 ActiveSync 客户端设计,可根据电子邮件地址自动检测设置。但是,这需要在 Exchange 服务器上进行进一步设置,并且并非所有系统都支持此操作。
另一种选择是在域上进行 MX 查找,连接到 SMTP 端口,并根据服务器声称的内容做出一些假设(
Microsoft ESMTP MAIL
是 Windows 将回答的内容,但是不一定表示 Exchange 服务器)。如果没有第三方软件或服务器端 BES,BlackBerry 设备不支持 Exchange ActiveSync。 Windows Mobile 设备将使用 Exchange 服务器的自动发现协议,或者在服务器不支持的情况下要求用户手动输入 Exchange 详细信息。
One option would be to implement the Exchange Autodiscover protocol, this is designed for ActiveSync clients to automatically detect settings based on an email address. However, this requires further setup on the Exchange server and not all systems will support this.
Another option would be to do an MX lookup on the domain, connect to SMTP port, and make some assumptions based on what the server claims to be (
Microsoft ESMTP MAIL
is what Windows will answer with, but that doesn't necessarily indicate an Exchange server).BlackBerry devices do not support Exchange ActiveSync without third party software or server-side BES. Windows Mobile devices will use the Autodiscover protocol for Exchange servers, or ask the user to enter Exchange details manually it the server does not support it.