Topic Last Modified: 2005-05-24

Telnet is an extremely useful tool for troubleshooting issues related to SMTP and mail flow. For example, you can use telnet to:

  • Verify that SMTP is installed properly, and that it has all the necessary commands.
  • Ensure that your server is accessible over the Internet.
  • Attempt mail delivery directly over the TCP port.
  • Determine that all servers are accepting connections.
  • Determine if a firewall is blocking a connection.
  • Ensure that a single user can receive mail.
  • Ensure that a specific domain can receive mail.
  • Ensure that a specific user or domain can send mail to your domain.

Note:

The following procedure shows you how to test the process of an internal user sending mail to a remote user when basic authentication is required for relaying mail outside your organization.

Before You Begin


Before you perform the procedure in this topic, read Troubleshooting Mail Flow and SMTP.

The following permissions are required to perform this procedure:

  • Member of the local administrators group

Procedure


To use telnet to test SMTP communication


  1. Open a telnet session: From a command prompt, type telnet, and then press ENTER.

  2. Type set local_echo on a computer running Microsoft Windows® 2000 Server or SET LOCALECHO on a computer running Windows Server™ 2003 or Windows XP, and then press ENTER. This command allows you to view the responses to the commands.

    Note:

    For a list of available telnet commands, type set ?.

  3. Type o <your mail server domain> 25,and then press ENTER.

  4. Type EHLO <your mail server domain>, and then press ENTER.

  5. Type AUTH LOGIN. The server responds with an encrypted prompt for your user name.

  6. Enter your user name encrypted in base 64. You can use one of several tools that are available to encode your user name.

  7. The server responds with an encrypted base 64 prompt for your password. Enter your password encrypted in base 64.

  8. Type MAIL FROM:<sender@domain.com>, and then press ENTER. If the sender is not permitted to send mail, the SMTP server returns an error.

  9. Type RCPT TO:<recipient@remotedomain.com>,and then press ENTER.If the recipient is not a valid recipient or the server does not accept mail for this domain, the SMTP server returns an error.

  10. Type DATA.

  11. If desired, type message text, press ENTER, type a period (.), and then press ENTER again.

  12. If mail is working properly, you should see a response similar to the following indicating that mail is queued for delivery:

    250 2.6.0 <INET-IMC-01UWr81nn9000fbad8@mail1.contoso.com.

For More Information


The following example shows a telnet test sending mail from contoso.com to a remote domain with a successful result:

250-mail1.fourthcoffee.com Hello [172.16.0.0]

250-TURN

250-ATRN

250-SIZE 5242880

250-ETRN

250-PIPELINING

250-DSN

250-ENHANCEDSTATUSCODES

250-8bitmime

250-BINARYMIME

250-CHUNKING

250-VRFY

250-X-EXPS GSSAPI NTLM

250-AUTH GSSAPI NTLM

250-X-LINK2STATE

250-XEXCH50

250 OK

334 VXNlcm5hbWU6

334 UGFzc3dvcmQ6

235 2.7.0 Authentication successful.

250 2.1.0 kim@fourthcoffee.com....Sender OK

250 2.1.5 ted@contoso.com

354 Start mail input; end with <CRLF>.<CRLF>

.

250 2.6.0 <INET-IMC-01UWr81nn9000fbad8@mail1.fourthcoffee.com> Queued mail for delivery

For more information, see Securing Your Exchange Server.

How to Use Telnet to Test SMTP Communication的更多相关文章

  1. 用telnet命令,SMTP发送邮件

    邮件的发送是基于smtp协议的.邮件客户端软件给smtp服务器传送邮件和smtp服务器之间传送邮件也都是基于smtp协议的.邮件客户端软件接受邮件是主要基于pop3协议的. 下面介绍利用windows ...

  2. SMTP邮件传输协议发送邮件和附件

    在以前接触的项目中,一直都是在做网站时用到了发送mail 的功能,在asp 和.net 中都有相关的发送mail 的类, 实现起来非常简单.最近这段时间因工作需要在C++ 中使用发送mail 的功能, ...

  3. SMTP邮件传输协议发送邮件和附件(转)

    1.     SMTP 常用命令简介 1). SMTP 常用命令 HELO/EHLO 向服务器标识用户身份 MAIL 初始化邮件传输 mail from: RCPT 标识单个的邮件接收人:常在MAIL ...

  4. ping vs telnet, what is the difference between them and when to use which?

    Ping is an ICMP protocol. Basically any system with TCP/IP could respond to ICMP calls if they were ...

  5. 简单邮件传输协议SMTP

    1.SMTP是由源地址到目的地址传送邮件的一组规则,用来控制信件的中转方式. 2.SMTP服务器是遵循SMTP协议的发送邮件服务器,用来发送或者中转发出的邮件,客户端通过SMTP命令与SMTP服务器进 ...

  6. https那些事儿

    (一)SSL/TLS协议运行机制的概述 一.作用 不使用SSL/TLS的HTTP通信,就是不加密的通信.所有信息明文传播,带来了三大风险. (1) 窃听风险(eavesdropping):第三方可以获 ...

  7. Linux监控体系

    监控体系 zabbix 博客:www.abcdocker.com 微信公众号:abcdocker 笔者QQ:381493251 Abcdocker交流群:454666672 如果遇到什么问题可以进群询 ...

  8. boost.Asio lib

    Documentation for Boost.Asio http://www.boost.org/doc/libs/1_62_0/doc/html/boost_asio.html https://w ...

  9. SOCKS 5协议详解(转)

    笔者在实际学习中,由于在有些软件用到了socks5(如oicq,icq等),对其原理不甚了解,相信很多朋友对其也不是很了解,于是仔细研读了一下rfc1928,觉得有必要译出来供大家参考. 1.介绍: ...

随机推荐

  1. 转载 jquery $(document).ready() 与window.onload的区别

    Jquery中$(document).ready()的作用类似于传统JavaScript中的window.onload方法,不过与window.onload方法还是有区别的. 1.执行时间 windo ...

  2. [转]使用Xcode 4发布App 实例操作

    使用xcode 4发布app 实例操作是本文介绍的内容,不多说,我们直接进入话题. 1.iOS Provisioning Portal 和iTunes Connect 没有变,下载与安装.mobile ...

  3. 如何准备PMP考试?

    东西在精,而不在多.话不多说,干货如下: 1.参加培训,不要持续时间太长,通常情况下3个月时间足够了:许多和我一起参加培训的学员,有时候准备6个月时间,反而没有3个月冲刺的时间考试结果好. 2.培训老 ...

  4. 【cs229-Lecture16】马尔可夫决策过程

    之前讲了监督学习和无监督学习,今天主要讲“强化学习”. 马尔科夫决策过程:Markov Decision Process(MDP) 价值函数:value function 值迭代:value iter ...

  5. WCF 遇到的问题

    1.只有项目的net版本2.0以上的才可以引用到wcf的类库 2.HTTP 错误 404.17 - Not Found  映射问题   WCF服务建立好,提示这个错误,缺少映射问题,要将应用程序池和项 ...

  6. eclipse中对项目进行分类管理

    我们在用Eclipse开发的时候通常会建很多类型的项目,如公司项目.自己项目.Demo等等,并且一个项目又可能有一个主项目和多个引用包,如果包所有的项目都放到一个workspace下面,则会引起混来, ...

  7. Web Service常识

      1 问题的引出 位于服务器的程序需要在Web页面上显示一个订单列表,它需要访问业务对象服务器上的程序,通过它读取订单列表,业务对象服务器又要访问数据库服务器.当一台计算机上的程序调用另一台计算机上 ...

  8. 我的WCF学习与强化系列文章

    1.WCF服务创建与使用(请求应答模式) 2.WCF服务创建与使用(双工模式) 3.WCF序列化 4.WCF实现方法重载 5.WCF会话(Session)与实例(Instance)管理 后面会继续更新 ...

  9. ASP.NET MVC 5 默认模板的JS和CSS 是怎么加载的?

    当创建一个默认的mvc模板后,项目如下: 运行项目后,鼠标右键查看源码,在源码里看到头部和尾部都有js和css文件被引用,他们是怎么被添加进来的呢? 首先我们先看对应的view文件index.csht ...

  10. knockoutjs+jquery.gridgroup 实现table数据加载和行合并

    目标 使用ajax获取到json数据后,通过ko绑定到表格,然后通过jquery.gridgroup插件实现行合并,效果如下: 步骤 1.引入插件 <script src="~/Scr ...