利用telnet命令测试邮件服务器是否可用

in 互联网技术 with 0 comment  访问: 334 次
root@fsb:~# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 fsb.fashengba.com ESMTP Postfix (Ubuntu)
helo fashengba.com               # 宣告客户端地址
250 fsb.fashengba.com
mail from:nock@fashengba.com     # 告知服务器发件人地址
250 2.1.0 Ok
rcpt to:nockgod@foxmail.com      # 告知服务器收件人地址
250 2.1.5 Ok
data                             # 告知服务器要传送数据了
354 End data with <CR><LF>.<CR><LF>
subject: Hello Boby!                         # 声明邮件主题
You will win a big prize, do you believe?
This is just a probability event。           # 邮件内容
.                                            # 邮件内容以点(.)结束
250 2.0.0 Ok: queued as 0432298D7A3
Quit                                         # 退出邮件服务器
221 2.0.0 Bye
Connection closed by foreign host.
root@fsb:~#

测试发送结果如下:
telnet-mail.png

WeZan
Responses