Chinaunix首页 | 论坛 | 博客
  • 博客访问: 147403
  • 博文数量: 52
  • 博客积分: 1447
  • 博客等级: 上尉
  • 技术积分: 505
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-15 15:09
文章分类

全部博文(52)

文章存档

2012年(1)

2011年(51)

分类: LINUX

2011-08-15 13:52:46

#1、测试saslauthd是否正常运行
/usr/sbin/saslauthd -a shadow   
root@mail:/home/zhangyq# testsaslauthd -uzaza -p123456
0: OK "Success."
 
 
#2、测试:pam_mysql  
#http://ncowboy.blog.163.com/blog/static/909276201055111541925/
#select username,password from mailbox;   #cat /etc/pam.d/smtp
#此测试前提是:导入了extmail的数据库后
root@mail:/home/zhangyq# testsaslauthd -u postmaster@extmail.org -p extmail -s smtp -f /var/spool/postfix/var/run/saslauthd/mux
0: OK "Success."   ##表示pam_mysql验证正常
 
 
#3、测试authlib
/usr/sbin/authtest -s login postmaster@extmail.org extmail
Authentication succeeded.
 
     Authenticated: postmaster@extmail.org  (uid 1001, gid 1001)
    Home Directory: /home/domains/extmail.org/postmaster
           Maildir: /home/domains/extmail.org/postmaster/Maildir/
             Quota: 104857600S
Encrypted Password: $1$phz1mRrj$3ok6BjeaoJYWDBsEPZb5C0
Cleartext Password: extmail
           Options: (none)
#这样表明ExtMan的正确安装,数据库也正确导入,courier-authlib能正确连接到mysql数据库
 
 
#4、smtp sasl:测试
root@mail:/home/vmail/extmail.org/jj/Maildir# telnet localhost 25    #输入内容1
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 ESMTP mail.jmail.com
ehlo mail.jmail.com         #输入内容2
250-mail.jmail.com
250-PIPELINING
250-SIZE 52428800
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login            #输入内容3
334 VXNlcm5hbWU6
cG9zdG1hc3RlckBleHRtYWlsLm9yZw==    #输入内容4,用户  (perl -e 'use MIME::Base64; print encode_base64("postmaster\@extmail.org")')
334 UGFzc3dvcmQ6
ZXh0bWFpbA==                #输入内容5,密码  (perl -e 'use MIME::Base64; print encode_base64("extmail")')
235 2.7.0 Authentication successful     #测试成功
 
 
#5、测试pop的认证
#测试POP3 请按如下步骤输入pop3命令测试其是否正常工作,注意蓝色的信息是我们输入到POP3服务器的(请首先登录extman自行建立jj@extmail.org用户,密码:123456)
root@mail:/home/vmail/extmail.org/jj/Maildir# telnet localhost 110   #输入内容1
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Hello there.
user jj@extmail.org    #输入内容2,用户
+OK Password required.
pass 123456        ##输入内容3,密码
+OK logged in.
list            #输入内容4,列出邮件
+OK POP3 clients that break here, they violate STD53.
1 641
2 417
3 489
4 379
.
quit            #输入内容5
+OK Bye-bye.
Connection closed by foreign host.
 
 
 
#6、详细测试
zhang@ubuntu:~/桌面$ telnet mail.jmail.com 25
Trying 192.168.0.234...
Connected to mail.jmail.com.
Escape character is '^]'.
220 ESMTP mail.jmail.com
ehlo mail.jmail.com
250-mail.jmail.com
250-PIPELINING
250-SIZE 5242880
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH LOGIN
334 VXNlcm5hbWU6
cG9zdG1hc3RlckBleHRtYWlsLm9yZw==
334 UGFzc3dvcmQ6
ZXh0bWFpbA==
235 2.7.0 Authentication successful
MAIL FROM:
250 2.1.0 Ok
RCPT TO:
250 2.1.5 Ok
DATA
354 End data with .
Client: To: jingjing
From:
Subject:SMTP Test!
this is a test message body!
.
250 2.0.0 Ok: queued as EE792E03CA

转载请标明出处:http://xishi.blog.chinaunix.net
阅读(1374) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~