V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Devin
V2EX  ›  程序员

验证 E-mail 地址有效性是用什么原理?

  •  
  •   Devin · 2015-12-13 11:01:52 +08:00 · 106052 次点击
    这是一个创建于 3293 天前的主题,其中的信息可能已经有所发展或是发生改变。
    比如说这样的网站 http://www.verifyemailaddress.org/
    是怎么实现的?
    qiayue
        1
    qiayue  
       2015-12-13 11:08:42 +08:00   ❤️ 2
    用 163 邮箱试了一下
    The Email Address Syntax is correct
    Connecting to 163mx01.mxmail.netease.com worked

    MX record found: 163mx01.mxmail.netease.com (Priority 10)
    MX record found: 163mx03.mxmail.netease.com (Priority 10)
    MX record found: 163mx02.mxmail.netease.com (Priority 10)
    MX record found: 163mx00.mxmail.netease.com (Priority 50)
    Connecting to 163mx01.mxmail.netease.com
    Connected to 163mx01.mxmail.netease.com
    Dialog with 163mx01.mxmail.netease.com ok
    ------------------------------------------------------------
    220 163.com Anti-spam GT for Coremail System (163com[20141201])
    HELO verifyemailaddress.org
    250 OK MAIL FROM: <[email protected]>
    250 Mail OK RCPT TO: <[email protected]>
    250 Mail OK QUIT 221 Bye
    ------------------------------------------------------------
    Email address [email protected] accepted


    所以人家网页里边把原理写的明明白白了
    Devin
        2
    Devin  
    OP
       2015-12-13 13:06:18 +08:00 via iPhone
    @qiayue 意思就是只进行客户端和服务端的协商,但不进行内容发送对吧
    msg7086
        3
    msg7086  
       2015-12-13 16:22:19 +08:00   ❤️ 1
    @Devin 就是实际投递一条消息,但是在说出邮件内容之前就断开连接。
    loveminds
        4
    loveminds  
       2015-12-13 16:36:48 +08:00   ❤️ 1
    The Email Address Syntax is correct
    Connecting to mxbiz1.qq.com worked
    We feel that [email protected] is valid

    MX record found: mxbiz1.qq.com (Priority 5)
    MX record found: mxbiz2.qq.com (Priority 10)
    Connecting to mxbiz1.qq.com
    Connected to mxbiz1.qq.com
    Dialog with mxbiz1.qq.com ok
    ------------------------------------------------------------
    220 bizmx3.qq.com MX QQ Mail Server
    HELO verifyemailaddress.org
    250 bizmx3.qq.com
    MAIL FROM: <[email protected]>
    250 Ok
    RCPT TO: <[email protected]>
    250 OK
    QUIT
    221 Bye.
    ------------------------------------------------------------
    Email address [email protected] accepted

    - See more at: http://www.verifyemailaddress.org/#result


    The Email Address Syntax is correct
    Connecting to kr1-aspmx1.worksmobile.com worked
    We feel that [email protected] is valid

    MX record found: kr1-aspmx1.worksmobile.com (Priority 10)
    MX record found: kr1-aspmx2.worksmobile.com (Priority 20)
    Connecting to kr1-aspmx1.worksmobile.com
    Connected to kr1-aspmx1.worksmobile.com
    Dialog with kr1-aspmx1.worksmobile.com ok
    ------------------------------------------------------------
    220 mx.worksmobile.com ESMTP Dar1WwJwS+eHiomQE23hMg - nsmtp
    HELO verifyemailaddress.org
    250 mx.worksmobile.com Pleased to meet you
    MAIL FROM: <[email protected]>
    250 2.1.0 OK Dar1WwJwS+eHiomQE23hMg - nsmtp
    RCPT TO: <[email protected]>
    250 2.1.5 OK Dar1WwJwS+eHiomQE23hMg - nsmtp
    QUIT
    221 2.0.0 Closing connection Dar1WwJwS+eHiomQE23hMg - nsmtp
    ------------------------------------------------------------
    Email address [email protected] accepted

    - See more at: http://www.verifyemailaddress.org/#result


    The Email Address Syntax is correct
    Connecting to in1-smtp.messagingengine.com worked
    We feel that [email protected] is valid
    View Email Owner
    MX record found: in1-smtp.messagingengine.com (Priority 10)
    MX record found: in2-smtp.messagingengine.com (Priority 20)
    Connecting to in1-smtp.messagingengine.com
    Connected to in1-smtp.messagingengine.com
    Dialog with in1-smtp.messagingengine.com ok
    ------------------------------------------------------------
    220 mx2.messagingengine.com ESMTP . No UCE permitted.
    HELO verifyemailaddress.org
    250 mx2.messagingengine.com
    MAIL FROM: <[email protected]>
    250 2.1.0 Ok
    RCPT TO: <[email protected]>
    250 2.1.5 Ok
    QUIT
    221 2.0.0 Bye
    ------------------------------------------------------------
    Email address [email protected] accepted

    - See more at: http://www.verifyemailaddress.org/#result


    原理大致就是这样,通过 SMTP 连接对方服务器罢了
    另外,国内也有个模仿版,同盾邮霸 http://youba.labs.fraudmetrix.cn/
    ynyounuo
        5
    ynyounuo  
       2015-12-13 17:35:22 +08:00
    loveminds
        6
    loveminds  
       2015-12-13 18:04:41 +08:00   ❤️ 2
    这东西还有个有趣的功能就是,可以看到各个公司的邮件服务提供商(不过很多是自建)和邮件服务器

    台积电,自建的邮件服务
    MX record found: mg.tsmc.com (Priority 10)
    Connecting to mg.tsmc.com
    Connected to mg.tsmc.com
    Dialog with mg.tsmc.com ok
    ------------------------------------------------------------
    220 z08fvironport1.tsmc.com.tw ESMTP
    HELO verifyemailaddress.org

    MTK ,也是自建,还挂了一台服务器
    MX record found: mailgw02.mediatek.com (Priority 10)
    MX record found: mailgw01.mediatek.com (Priority 10)
    Connecting to mailgw02.mediatek.com
    Connected to mailgw02.mediatek.com
    Dialog with mailgw02.mediatek.com failed
    ------------------------------------------------------------
    Connecting to mailgw01.mediatek.com
    Connected to mailgw01.mediatek.com
    Dialog with mailgw01.mediatek.com ok
    ------------------------------------------------------------
    220 Cellopoint E-mail Firewall v3.9.12 Build 0813 ready

    高通,服务器名挺有意思
    MX record found: gatewayhorse2.qualcomm.com (Priority 10)
    MX record found: gatewayhorse1.qualcomm.com (Priority 10)
    MX record found: gatewaypony02.qualcomm.com (Priority 10)
    MX record found: gatewaypony01.qualcomm.com (Priority 10)
    Connecting to gatewayhorse2.qualcomm.com
    Connected to gatewayhorse2.qualcomm.com
    Dialog with gatewayhorse2.qualcomm.com ok
    ------------------------------------------------------------
    220-gatewayhorse2.qualcomm.com ESMTP
    220 QUALCOMM does not authorize the use of its computers or computer networks to deliver unsolicited electronic mail advertisements.

    中兴,用的 Websense 的产品
    MX record found: mx5.zte.com.cn (Priority 10)
    MX record found: mx6.zte.com.cn (Priority 10)
    Connecting to mx5.zte.com.cn
    Connected to mx5.zte.com.cn
    Dialog with mx5.zte.com.cn ok
    ------------------------------------------------------------
    220 220 OK***************
    HELO verifyemailaddress.org
    250 Websense Email Security Gateway

    华为也用他家的...
    MX record found: mx1.huawei.com (Priority 10)
    MX record found: mx2.huawei.com (Priority 15)
    MX record found: mx4.huawei.com (Priority 20)
    MX record found: mx3.huawei.com (Priority 20)
    Connecting to mx1.huawei.com
    Connected to mx1.huawei.com
    Dialog with mx1.huawei.com ok
    ------------------------------------------------------------
    220 Huawei Message Service is ready.
    HELO verifyemailaddress.org
    250 Websense email protection service

    中联重科,用的 263 的邮件服务
    MX record found: mxw.263.net (Priority 5)
    MX record found: mx.263.net (Priority 10)
    Connecting to mxw.263.net
    Connected to mxw.263.net
    Dialog with mxw.263.net ok
    ------------------------------------------------------------
    220 Welcome to TAP gateway for 263
    HELO verifyemailaddress.org
    250 263.net
    MAIL FROM: <[email protected]>
    250 Ok
    RCPT TO: <[email protected]>

    中信银行,趋势科技 IMSVA
    MX record found: email1.citicbank.com (Priority 10)
    Connecting to email1.citicbank.com
    Connected to email1.citicbank.com
    Dialog with email1.citicbank.com ok
    ------------------------------------------------------------
    220 ESMTP IMSVA

    兴业银行, McAfee Email Gateway EG5500
    MX record found: smtp.cib.com.cn (Priority 10)
    MX record found: smtp1.cib.com.cn (Priority 15)
    Connecting to smtp.cib.com.cn
    Connected to smtp.cib.com.cn
    Dialog with smtp.cib.com.cn ok
    ------------------------------------------------------------
    220 mailgw1.cib.com.cn EG5500/SMTP Ready.

    交通银行,用的尚易
    MX record found: smtpnmp.bankcomm.com (Priority 10)
    MX record found: smtp.bankcomm.com (Priority 20)
    Connecting to smtpnmp.bankcomm.com
    Connected to smtpnmp.bankcomm.com
    Dialog with smtpnmp.bankcomm.com ok
    ------------------------------------------------------------
    220 bankcomm.com Anti-spam GT for Coremail System (bankcomm[20151012])

    人民银行,同样用的尚易,而且还是测试版(demo)
    MX record found: mail.pbc.gov.cn (Priority 5)
    Connecting to mail.pbc.gov.cn
    Connected to mail.pbc.gov.cn
    Dialog with mail.pbc.gov.cn failed
    ------------------------------------------------------------
    220 pbc.gov.cn Anti-spam GT for Coremail System (mtdemo-pbc[20151210])

    中投公司 /中央汇金,梭子鱼网关
    MX record found: mxtele-a.huijin-inv.cn (Priority 50)
    MX record found: mxctc-a.huijin-inv.cn (Priority 50)
    MX record found: mail.huijin-inv.cn (Priority 100)
    MX record found: mxctc.huijin-inv.cn (Priority 100)
    Connecting to mxtele-a.huijin-inv.cn
    Connected to mxtele-a.huijin-inv.cn
    Dialog with mxtele-a.huijin-inv.cn ok
    ------------------------------------------------------------
    220 barr
    HELO verifyemailaddress.org
    250 barracuda.china-inv.cn Hello

    中国国航, McAfee Email Gateway EG4500
    MX record found: mailx.airchina.com.cn (Priority 10)
    Connecting to mailx.airchina.com.cn
    Connected to mailx.airchina.com.cn
    Dialog with mailx.airchina.com.cn ok
    ------------------------------------------------------------
    220 mailx.airchina.com EG4500/SMTP Ready.

    南方航空, McAfee Email Gateway EG5500
    View Email Owner
    MX record found: smtp1.cs-air.com (Priority 10)
    Connecting to smtp1.cs-air.com
    Connected to smtp1.cs-air.com
    Dialog with smtp1.cs-air.com ok
    ------------------------------------------------------------
    220 eg1.csair.com EG5500/SMTP Ready.

    春秋航空, MDaemon
    MX record found: mail1.air-spring.com (Priority 5)
    Connecting to mail1.air-spring.com
    Connected to mail1.air-spring.com
    Dialog with mail1.air-spring.com failed
    ------------------------------------------------------------
    220 china-sss.com ESMTP MDaemon 9.6.3; Sun, 13 Dec 2015 17:38:53 +0800

    滴滴快的,网易企业邮箱
    MX record found: hzmx01.mxmail.netease.com (Priority 5)
    MX record found: hzmx02.mxmail.netease.com (Priority 10)
    Connecting to hzmx01.mxmail.netease.com
    Connected to hzmx01.mxmail.netease.com
    Dialog with hzmx01.mxmail.netease.com ok
    ------------------------------------------------------------
    220 hzqiyemx.proxy.163.com ESMTP ready
    HELO verifyemailaddress.org
    250 hzqiyemx.proxy.163.com

    京东,趋势科技 IMSVA
    MX record found: mx.jd.com (Priority 10)
    Connecting to mx.jd.com
    Connected to mx.jd.com
    Dialog with mx.jd.com ok
    ------------------------------------------------------------
    220 Welcome to JD.com
    HELO verifyemailaddress.org
    250 IMSVA43.JD.COM

    荔枝 FM ,腾讯企业邮箱
    MX record found: mxbiz1.qq.com (Priority 5)
    MX record found: mxbiz2.qq.com (Priority 10)
    Connecting to mxbiz1.qq.com
    Connected to mxbiz1.qq.com
    Dialog with mxbiz1.qq.com ok
    ------------------------------------------------------------
    220 bizmx9.qq.com MX QQ Mail Server
    HELO verifyemailaddress.org
    250 bizmx9.qq.com
    MAIL FROM: <[email protected]>
    250 Ok
    RCPT TO: <[email protected]>

    美团, Postfix
    MX record found: mx01.meituan.com (Priority 10)
    MX record found: mx02.meituan.com (Priority 10)
    MX record found: mail3.sankuai.info (Priority 20)
    Connecting to mx01.meituan.com
    Connected to mx01.meituan.com
    Dialog with mx01.meituan.com ok
    ------------------------------------------------------------
    220 it-mx01.lf.sankuai.com ESMTP Postfix

    优步, Google Apps
    MX record found: aspmx.l.google.com (Priority 10)
    MX record found: alt2.aspmx.l.google.com (Priority 20)
    MX record found: alt1.aspmx.l.google.com (Priority 20)
    MX record found: aspmx5.googlemail.com (Priority 30)
    MX record found: aspmx4.googlemail.com (Priority 30)
    MX record found: aspmx2.googlemail.com (Priority 30)
    MX record found: aspmx3.googlemail.com (Priority 30)
    Connecting to aspmx.l.google.com
    Connected to aspmx.l.google.com
    Dialog with aspmx.l.google.com ok
    ------------------------------------------------------------
    220 mx.google.com ESMTP b9si17685639wmf.44 - gsmtp
    HELO verifyemailaddress.org
    250 mx.google.com at your service
    MAIL FROM: <[email protected]>
    250 2.1.0 OK b9si17685639wmf.44 - gsmtp
    RCPT TO: <[email protected]>

    豆瓣,也是 Google Apps
    MX record found: aspmx.l.google.com (Priority 10)
    MX record found: alt2.aspmx.l.google.com (Priority 20)
    MX record found: alt1.aspmx.l.google.com (Priority 20)
    MX record found: aspmx3.googlemail.com (Priority 30)
    MX record found: aspmx2.googlemail.com (Priority 30)
    Connecting to aspmx.l.google.com
    Connected to aspmx.l.google.com
    Dialog with aspmx.l.google.com ok
    ------------------------------------------------------------
    220 mx.google.com ESMTP g66si17678822wmg.41 - gsmtp
    HELO verifyemailaddress.org
    250 mx.google.com at your service
    MAIL FROM: <[email protected]>
    250 2.1.0 OK g66si17678822wmg.41 - gsmtp
    RCPT TO: <[email protected]>

    爱稀饭动画,腾讯企业邮箱
    MX record found: mxbiz1.qq.com (Priority 5)
    MX record found: mxbiz2.qq.com (Priority 10)
    Connecting to mxbiz1.qq.com
    Connected to mxbiz1.qq.com
    Dialog with mxbiz1.qq.com ok
    ------------------------------------------------------------
    220 bizmx4.qq.com MX QQ Mail Server
    HELO verifyemailaddress.org
    250 bizmx4.qq.com
    MAIL FROM: <[email protected]>
    250 Ok
    RCPT TO: <[email protected]>

    哔哩哔哩,也是腾讯
    MX record found: mxbiz1.qq.com (Priority 5)
    MX record found: mxbiz2.qq.com (Priority 10)
    Connecting to mxbiz1.qq.com
    Connected to mxbiz1.qq.com
    Dialog with mxbiz1.qq.com ok
    ------------------------------------------------------------
    220 bizmx3.qq.com MX QQ Mail Server
    HELO verifyemailaddress.org
    250 bizmx3.qq.com
    MAIL FROM: <[email protected]>
    250 Ok
    RCPT TO: <[email protected]>

    全国人大,亿邮(貌似绝迹好久了)
    Connecting to smtp.npc.gov.cn did not work
    MX record found: smtp.npc.gov.cn (Priority 10)
    Connecting to smtp.npc.gov.cn
    Connected to smtp.npc.gov.cn
    Dialog with smtp.npc.gov.cn failed
    ------------------------------------------------------------
    220 smtp ready
    HELO verifyemailaddress.org
    250 eyou.net HELO, pleased to meet verifyemailaddress.org

    中国政府网,中标麒麟
    MX record found: mx.mail.gov.cn (Priority 10)
    Connecting to mx.mail.gov.cn
    Connected to mx.mail.gov.cn
    Dialog with mx.mail.gov.cn ok
    ------------------------------------------------------------
    220 cs2c antispam server1.1
    loveminds
        7
    loveminds  
       2015-12-13 19:43:13 +08:00
    接以上,韵达快递,微软 Exchange Server
    MX record found: mail.yundaex.com (Priority 10)
    Connecting to mail.yundaex.com
    Connected to mail.yundaex.com
    Dialog with mail.yundaex.com ok
    ------------------------------------------------------------
    220 CASHUB01.yundasys.com Microsoft ESMTP MAIL Service ready at Sun, 13 Dec 2015 18:09:28 +0800

    申通快递, Winmail
    MX record found: mail.sto.cn (Priority 5)
    Connecting to mail.sto.cn
    Connected to mail.sto.cn
    Dialog with mail.sto.cn failed
    ------------------------------------------------------------
    220 WINDOWS-K12NKJ5.sto.cn Winmail Mail Server ESMTP ready; Sun, 13 Dec 2015 18:16:40 +0800

    六福珠宝, Postfix
    MX record found: mail.lukfook.com.hk (Priority 20)
    Connecting to mail.lukfook.com.hk
    Connected to mail.lukfook.com.hk
    Dialog with mail.lukfook.com.hk ok
    ------------------------------------------------------------
    220 mail.lukfook.com.hk ESMTP Postfix

    中国黄金,阿里云邮
    MX record found: mxw.mxhichina.com (Priority 4)
    MX record found: mxn.mxhichina.com (Priority 5)
    Connecting to mxw.mxhichina.com
    Connect to mxw.mxhichina.com failed
    Connecting to mxn.mxhichina.com
    Connected to mxn.mxhichina.com
    Dialog with mxn.mxhichina.com ok
    ------------------------------------------------------------
    220 mx1.aliyun-inc.com MX AliMail Server(10.147.43.61)
    HELO verifyemailaddress.org
    250 Ok
    MAIL FROM: <[email protected]>
    250 Mail Ok
    RCPT TO: <[email protected]>

    公安部,新版亿邮
    MX record found: mail.mps.gov.cn (Priority 10)
    Connecting to mail.mps.gov.cn
    Connected to mail.mps.gov.cn
    Dialog with mail.mps.gov.cn ok
    ------------------------------------------------------------
    220 mps.gov.cn [18968] ESMTP eYou MTA v8.1.0; Sun, 13 Dec 2015 18:11:05 +0800

    锤子科技, Office 365
    MX record found: smartisan-com.mail.protection.outlook.com (Priority 1)
    Connecting to smartisan-com.mail.protection.outlook.com
    Connected to smartisan-com.mail.protection.outlook.com
    Dialog with smartisan-com.mail.protection.outlook.com ok
    ------------------------------------------------------------
    220 HK2APC01FT022.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Sun, 13 Dec 2015 11:11:39 +0000

    电脑爱好者,看起来像是 IIS 的邮件服务
    MX record found: mailx.cfan.com.cn (Priority 10)
    Connecting to mailx.cfan.com.cn
    Connected to mailx.cfan.com.cn
    Dialog with mailx.cfan.com.cn ok
    ------------------------------------------------------------
    220 mailgateway.ccw.group Microsoft ESMTP MAIL Service, Version: 6.0.3790.4675 ready at Sun, 13 Dec 2015 19:23:30 +0800

    三联周刊,腾讯企业邮箱
    MX record found: mxbiz1.qq.com (Priority 5)
    MX record found: mxbiz2.qq.com (Priority 10)
    Connecting to mxbiz1.qq.com
    Connected to mxbiz1.qq.com
    Dialog with mxbiz1.qq.com ok
    ------------------------------------------------------------
    220 bizmx3.qq.com MX QQ Mail Server
    HELO verifyemailaddress.org
    250 bizmx3.qq.com
    MAIL FROM: <[email protected]>
    250 Ok
    RCPT TO: <[email protected]>

    最世文化 /文艺风象, QQ 域名邮箱(挺老的产品了,后被企业邮箱替代)
    MX record found: mxdomain.qq.com (Priority 10)
    Connecting to mxdomain.qq.com
    Connected to mxdomain.qq.com
    Dialog with mxdomain.qq.com ok
    ------------------------------------------------------------
    220 bizmx3.qq.com MX QQ Mail Server
    HELO verifyemailaddress.org 250 bizmx3.qq.com
    MAIL FROM: <[email protected]>
    250 Ok
    RCPT TO: <[email protected]>

    漫友 /新蕾 Story101 (记得多年前喜欢漫画和小说的时候经常给他们投稿,现在,好像停刊了),中资源企业邮箱,基于 Postfix
    MX record found: mxa158d.chinaemail.cn (Priority 5)
    MX record found: mx158d.chinaemail.cn (Priority 10)
    Connecting to mxa158d.chinaemail.cn
    Connected to mxa158d.chinaemail.cn
    Dialog with mxa158d.chinaemail.cn ok
    ------------------------------------------------------------
    220 mx100.chinaemail.cn ESMTP Postfix (2.4.1)
    HELO verifyemailaddress.org
    250 mx100.chinaemail.cn
    MAIL FROM: <[email protected]>
    250 2.1.0 Ok
    RCPT TO: <[email protected]>
    RAKE
        8
    RAKE  
       2015-12-13 20:02:22 +08:00
    @loveminds 查下 MX 记录就好不必非要折磨 verifyemailaddress 233
    Devin
        9
    Devin  
    OP
       2015-12-13 20:18:28 +08:00 via iPhone
    @RAKE 目测这网站要被玩坏😂
    loveminds
        10
    loveminds  
       2015-12-15 15:55:44 +08:00
    @RAKE MX 记录可回复不出来是趋势的网关还是麦咖啡的网关...或是 Exchange/Postfix
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5895 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 01:51 · PVG 09:51 · LAX 17:51 · JFK 20:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.