分类: BSD
2008-04-17 09:26:02
2、测试postfix
由于在发信认证时使用的是BASE64 编码,所以要把用户名和密码转BASE64 格式,在此前需要安装 p5-MIME-BASE64
%cd /usr/ports/converters/p5-MIME-Base64/
%make install
测试用户test@extmail.org 密码 test
%perl -MMIME::Base64 -e 'print encode_base64("test@extmail.org");'
dGVzdEBleHRtYWlsLm9yZw==
%perl -MMIME::Base64 -e 'print encode_base64("test");'
dGVzdA==
看下面的测试过程
%telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 sharesky.cn ESMTP Mail System
ehlo test.com
250-mail.extmail.org
250-PIPELINING
250-SIZE 14680064
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME
auth login
334 VXNlcm5hbWU6
dGVzdEBleHRtYWlsLm9yZw==
334 UGFzc3dvcmQ6
dGVzdA==
235 Authentication successful
mail from:
250 Ok
rcpt to:
250 Ok
data
354 End data with .
this is a test.
.
250 Ok: queued as 23CEE5C38
quit
221 Bye
Connection closed by foreign host.
下面是系统所产生的maillog