小编Rod*_* HA的帖子

使用shell脚本在日志中保存来自telnet的SMTP会话

我正在创建一个脚本来测试HELO的电子邮件..

直接在telnet控制台中,命令运行正常,但在脚本中,我无法获得输出.

在bash中:

$ telnet alt1.aspmx.l.google.com 25
HELO verify-email.org
MAIL FROM: <check@verify-email.org>
RCPT TO: <test@gmail.com>
quit
Run Code Online (Sandbox Code Playgroud)

结果是:

root@san [~]# telnet alt1.aspmx.l.google.com 25
Trying 2a00:1450:4010:c09::1a...
Connected to alt1.aspmx.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP qm6si6508388lbb.110 - gsmtp
HELO verify-email.org
250 mx.google.com at your service
MAIL FROM: <check@verify-email.org>
250 2.1.0 OK qm6si6508388lbb.110 - gsmtp
RCPT TO: <test@gmail.com>
550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos …
Run Code Online (Sandbox Code Playgroud)

bash telnet

5
推荐指数
1
解决办法
266
查看次数

标签 统计

bash ×1

telnet ×1