海运的博客

用Telnet发送/接收邮件、测试Mail服务器

发布时间:July 9, 2012 // 分类:Mail // No Comments

Telnet连接SMTP服务器发送邮件:

telnet mail.haiyun.me 25
Trying 192.168.1.2...
Connected to smtp.haiyun.me (192.168.1.2).
Escape character is '^]'.
220 mail.www.haiyun.me ESMTP Postfix
mail from:mail@haiyun.me #发件人
250 2.1.0 Ok
rcpt to:test@haiyun.me #收件人
250 2.1.5 Ok
data #输入数据
354 End data with <CR><LF>.<CR><LF>
test mail #邮件内容
. #输入结束
250 2.0.0 Ok: queued as 6239437EA2C
quit #退出
221 2.0.0 Bye

Telnet连接POP服务器接收邮件:

telnet mail.haiyun.me 110
+OK Dovecot ready.
user test #用户
+OK
pass passwd #密码
+OK Logged in.
list #列出当前邮件
+OK 2 messages:
1 972
2 466
.
retr 2 #查看编号2邮件
+OK 466 octets
Return-Path: <mail@haiyun.me>
X-Original-To: test@haiyun.me
Delivered-To: test@haiyun.me
Received: from (test.haiyun.me [192.168.1.3])
    by mail.haiyun.me (Postfix) with SMTP id 6239437EA2C
    for <test@haiyun.me>; Wed,  4 Jul 2012 12:56:45 +0800 (CST)
Message-Id: <20120704045706.6239437EA2C@mail.haiyun.me>
Date: Wed,  4 Jul 2012 12:56:45 +0800 (CST)
From: mail@haiyun.me
To: undisclosed-recipients:;

test mail
.
quit
+OK Logging out.

Telnet连接IMAP服务器接收邮件:

telnet mail.haiyun.me 143
* OK Dovecot ready.
A01 LOGIN test passwd #登入用户、密码
A01 OK Logged in.
A02 LIST "" * #列出信箱列表    
* LIST (\HasNoChildren) "." "INBOX"
A02 OK List completed.
A03 Select "INBOX"  #选择信箱    
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
* 2 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1341377220] UIDs valid
* OK [UIDNEXT 3] Predicted next UID
A03 OK [READ-WRITE] Select completed.
A04 Search ALL #查询所有邮件
* SEARCH 1 2
A04 OK Search completed.
A05 Fetch 2 full #获取邮件2内容
* 2 FETCH (FLAGS (\Seen) INTERNALDATE "04-Jul-2012 12:57:25 +0800" RFC822.SIZE 466 ENVELOPE ("Wed, 4 Jul 2012 12:56:45 +0800 (CST)" NIL ((NIL NIL "404344922" "qq.com")) ((NIL NIL "404344922" "qq.com")) ((NIL NIL "404344922" "qq.com")) ((NIL NIL "undisclosed-recipients" NIL)(NIL NIL "" "MISSING_DOMAIN")(NIL NIL NIL NIL)) NIL NIL NIL "<20120704045706.6239437EA2C@mail.www.haiyun.me>") BODY ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 11 1))
A05 OK Fetch completed.
A06 logout #登出
* BYE Logging out
A06 OK Logout completed.

标签:smtp, telnet, imap, pop, telnet测试邮件服务器, telnet接收发送邮件

评论已关闭

分类
最新文章
最近回复
  • 海运: 正常情况下编译整个内核执行make menuconfig后就不会出现此提示,当单独编译单个模块...
  • oijq: 就是用的armbian的配置文件哈,按你的教程做的,在执行make LOCALVERSION=...
  • 海运: 使用armbian的配置文件,其它添加或修改自己懂的部分,不懂的就不要碰了。
  • oijq: 编译时这些选项全部选Y吗?Actions Semi Platforms (ARCH_ACTIO...
  • 海运: n1编译bbr内核模块参考这个:https://www.haiyun.me/archives/...
  • jiqz: make M=net/ipv4/ CONFIG_TCP_CONG_BBR=m modules编...
  • ruralhunter: 哦,文档里应该是对的,是.config
  • ruralhunter: cp /mnt/boot/config-4.18.7-aml-s9xxx .config这里应...
  • 海运: 你是编译不成功呢?还是编译后不能运行呢?还是运行后不能访问web界面呢?
  • 白墨: 可能不清楚就是编译安装后启动后访问不了web界面