到目前为止,一个基本的邮件系统已经安装完成,他支持了smtp,pop3,imap,webmail。并且支持对应的SSL加密smtps,pop3s,imaps,https。

1、测试pop3

1、测试pop3(请首先登录extman自行建立test@extmail.org用户,密码:test)

shell

# telnet localhost 110

其过程如下:

Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK Hello there.
user test@extmail.org     << 输入内容
+OK Password required.
pass test     << 输入内容
+OK logged in.
list     << 输入内容
+OK POP3 clients that break here, they violate STD53.
.        << 输入内容
quit     << 输入内容
+OK Bye-bye.
Connection closed by foreign host.

2、测试smtp认证

通过以下命令获得test@extmail.org的用户名及密码的BASE64编码:

shell

# perl -e 'use MIME::Base64; print encode_base64("test\@extmail.org")'
dGVzdEBleHRtYWlsLm9yZw==

shell

# perl -e 'use MIME::Base64; print encode_base64("test")'
dGVzdA==

然后本机测试,

shell

# telnet localhost 25

其过程如下:

Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.extmail.org ESMTP Postfix
ehlo demo.domain.tld     << 输入内容
250-mail.extmail.org
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6
dGVzdEBleHRtYWlsLm9yZw==     << 输入内容
334 UGFzc3dvcmQ6
dGVzdA==     << 输入内容
235 2.0.0 Authentication successful
quit     << 输入内容
221 2.0.0 Bye

最后出现235 Authentication Successful 表明认证成功了。

3、测试smtps

shell

# telnet localhost 25

其过程如下:

Trying ::1...
Trying 127.0.0.1...
Connected to localhost.localhostadmin.
Escape character is '^]'.
220 mail.extmail.org ESMTP Postfix
ehlo localhost     << 输入内容
250-mail.extmail.org
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
STARTTLS     << 输入内容
220 2.0.0 Ready to start TLS
^]
telnet> q     << 输入内容
Connection closed.

4、测试pop3s/imaps

telnet连接本机的993,995端口出现如下提示:

shell

# telnet localhost 993

其过程如下:

Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.localhostadmin.
Escape character is '^]'.
^]
telnet> q
Connection closed.

shell

# telnet localhost 995


其过程如下:

Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.localhostadmin.
Escape character is '^]'.
^]
telnet> q
Connection closed.

5、在OutLook中测试

通过如下链接登陆webmail /extman

http://mail.extmail.org
https://mail.extmail.org
http://mail.extmail.org/extman
https://mail.extmail.org/extman
 
拾壹、测试基本系统.txt · 最后更改: 2012/11/01 22:12 由 shaobo
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki