本篇文章给大家分享的是有关Linux中怎么检测邮箱是否存在,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。
例如我们要验证 laiconglin3@126.com
是否真实存在
nslookup -type=MX 126.com
查找126.com 的MX 地址
test@test:~$ nslookup -type=MX 126.com
Server: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
126.com mail exchanger = 10 126mx02.mxmail.netease.com.
126.com mail exchanger = 10 126mx03.mxmail.netease.com.
126.com mail exchanger = 10 126mx01.mxmail.netease.com.
126.com mail exchanger = 50 126mx00.mxmail.netease.com.
Authoritative answers can be found from:
test@test:~$
telnet 126mx02.mxmail.netease.com 25
test@test:~$ telnet 126mx02.mxmail.netease.com 25
Trying 220.181.15.202...
Connected to 126mx02.mxmail.netease.com.
Escape character is '^]'.
220 126.com Anti-spam GT for Coremail System (126com[20140526])
helo laiconglin3
发送helo
命令到smtp服务器,laiconglin3
只是个名字
helo laiconglin3
250 OK
mail from:<laiconglin3@gmail.com>
指明发送者,只需是个合法名字即可
mail from:<laiconglin3@gmail.com>
250 Mail OK
rcpt to:<laiconglin3@126.com>
发送rcpt to命令,验证邮箱是否存在
rcpt to:<laiconglin3@126.com>
250 Mail OK
以上就是Linux中怎么检测邮箱是否存在,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注天达云行业资讯频道。