Linux基础
1 前言
笔者有时候调试邮件服务器需要使用Telnet直接去操纵IMAP与SMTP的服务,所以整理此文。
2 最佳实践
2.1 IMAP服务
2.1.1 使用Telnet链接IMAP服务
telnet imap.cmdschool.org 143
信息显示如下,
Trying 113.96.209.109... Connected to imap.cmdschool.org. Escape character is '^]'. * OK Domino IMAP4 Server Release 9.0.1FP3 ready Tue, 3 Sep 2019 09:19:36 +0800
2.1.2 登录邮箱
a01 login username password
登录成功你将会看到如下提示,
a01 OK LOGIN completed
2.1.3 列出所有信箱
a02 list "" *
将会看到如下提示,
* LIST (\HasNoChildren) "\\" Drafts * LIST (\Noinferiors \HasNoChildren) "\\" Inbox * LIST (\HasNoChildren) "\\" Sent [...] a02 OK LIST completed
2.1.4 退出协议
a03 logout
命令显示如下,
* BYE logging out Connection closed by foreign host.
2.1 SMTP服务
2.1.1 使用Telnet链接SMTP服务
telnet smtp.cmdschool.org 25
信息显示如下,
Trying 113.96.232.106... Connected to smtp.cmdschool.org. Escape character is '^]'. 220 smtp.cmdschool.org ESMTP Service (IBM Domino Release 9.0.1FP3) ready at Tue, 3 Sep 2019 09:46:31 +0800
2.1.2 helo指令
helo cmdschool.org
250 smtp.cmdschool.org Hello cmdschool.org ([113.96.232.106]), pleased to meet you
2.1.3 声明发件人
mail from:will@cmdschool.org
信息显示如下,
250 will@cmdschool.org... Sender OK
2.1.4 声明主送人
rcpt to:free@cmdschool.org
信息显示如下,
250 free@cmdschool.org.. Recipient OK
2.1.5 声明邮件正文
data
可见如下提示,
354 Enter message, end with "." on a line by itself
根据向导输入邮件正文与结束符号,
test .
信息显示如下,
250 Message accepted for delivery
参阅文档
======================
IMAP的文档
—————–
https://blog.csdn.net/pathfinder163/article/details/6397199
https://busylog.net/imap-telnet-example-test-imap-with-telnet/
SMTP的文档
—————
http://www-01.ibm.com/support/docview.wss?uid=swg21568052
没有评论