免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2822 | 回复: 3
打印 上一主题 下一主题

[Mail] postfix smtp pop验证失败! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-03-11 19:29 |只看该作者 |倒序浏览
AS4+postfix-2.3.8+courier-authlib 0.57+courier-imap 4.0.6+mysql
出现的问题是:
[root@localhost saslfinger-1.0.1]# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 email.XXXX.net ESMTP "Version not Available"
ehlo email.XXXX.net
250-email.XXXX.net
250-PIPELINING
250-SIZE 14336000
250-VRFY
250-ETRN
250-AUTH PLAIN
250-AUTH=PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
535 5.7.0 Error: authentication failed: no mechanism available
quit
221 2.0.0 Bye
Connection closed by foreign host.
==================================================
[root@localhost saslfinger-1.0.1]# telnet 127.0.0.1 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK Hello there.
user ghz@XXXX.edu.cn
+OK Password required.
pass 123456
-ERR Login failed.
quit
+OK Better luck next time.
Connection closed by foreign host.
也就是验证错误不能通过了。

查看本机是否开放所有服务:
[root@localhost saslfinger-1.0.1]# netstat -ant|grep "LISTEN"
tcp        0      0 0.0.0.0:32769               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:113                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN
tcp        0      0 :::110                      :::*                        LISTEN
tcp        0      0 :::143                      :::*                        LISTEN
tcp        0      0 :::80                       :::*                        LISTEN
tcp        0      0 :::22                       :::*                        LISTEN
tcp        0      0 :::443                      :::*                        LISTEN
===================================================
关键的几个配置文件的内容如下:
[root@localhost saslfinger-1.0.1]# vi /etc/psotfix/main.cf
#===============================BASE================================
myhostname = email.XXXX.net
mydomain = XXXX.net
myorigin = $mydomain
mydestination = $myhostname local localhost.$mydomain
mynetworks = 127.0.0.0/8
inet_interfaces = all
alias_maps = hash:/etc/postfix/aliases
#
#
#
#=============================Virtual Mailbox settings==================
virtual_mailbox_base = /var/mailbox
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
#
#
#
#===============================QUOTA====================================
message_size_limit = 14336000
virtual_mailbox_limit = 20971520
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql/mysql_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry,the room is too small.
virtual_overquota_bounce = yes
#
#
#
#=============================SASL=====================================
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination,permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner = $myhostname ESMTP "Version not Available"


-------------------------------------------------------------------------------------------------------------------

/etc/psotfix/master.cf中:
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=email argv=/usr/local/maildrop/bin/maildrop -w 90 -d ${recipient}



------------------------------------------------------------------------------------------------------------------
[root@localhost mysql]# vi mysql_virtual_alias_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address
--------------------------------------------------------------------------------------------------------------

[root@localhost mysql]# vi mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username
#additional_conditions = and active = '1'

---------------------------------------------------------------------------------------------------------------

[root@localhost mysql]# vi mysql_virtual_mailbox_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
#additional_conditions = and active = '1'

--------------------------------------------------------------------------------------------------------------

[root@localhost mysql]# vi mysql_virtual_domains_maps.cf

user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain
#additional_conditions = and backupmx = '0' and active = '1'


------------------------------------------------------------------------------------------------------------
用saslfinger测试的错误是:
[root@localhost authlib]# saslfinger -c
saslfinger - postfix Cyrus sasl configuration Sun Mar 11 19:21:56 CST 2007
version: 1.0.1
mode: client-side SMTP AUTH

-- basics --
Postfix: 2.3.8
System: Red Hat Enterprise Linux AS release 4 (Nahant)

-- smtp is linked to --
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x00910000)

-- active SMTP AUTH and TLS parameters for smtp --
No active [color="#000000"]SMTP AUTH and TLS parameters for smtp in main.cf!
SMTP AUTH can't work!


------------------------------------------------------------------------------------------------------------
/var/log/maillog中的错误信息:
Mar 11 15:32:23 localhost postfix/smtpd[25953]: warning: SASL authentication failure: Couldn't find mech login
Mar 11 15:32:23 localhost postfix/smtpd[25953]: warning: localhost.localdomain[127.0.0.1]: SASL login authentication failed: no mechanism available



一次也贴不了那么多的了。先放这些。

小弟搜索了N多资料,也没有找到相应的解决方法。不知道哪位大哥遇到过相类似的问题。能否把解决方法告知一二,小弟感激不尽!

[ 本帖最后由 tiandi_g 于 2007-3-11 19:30 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-03-11 21:52 |只看该作者
/etc/postfix/sasl/smtpd.conf   ??
/etc/courier/pop3d  ??

[ 本帖最后由 sosogh 于 2007-3-11 21:55 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2007-03-11 23:56 |只看该作者
[root@localhost sasl2]# vi /usr/lib/sasl2/smtpd.conf
pwcheck_method:authdaemond
log_level:3
srp_mda:md5
password_format:crypt
mech_listLAIN LOGIN
authdaemond_path:/usr/local/var/spool/authdaemon/socket
=============================================================
[root@localhost etc]# vi /usr/local/imap/etc/pop3d
PIDFILE=/var/run/pop3d.pid
MAXDAEMONS=40
MAXPERIP=4
POP3AUTH=""
POP3AUTH_ORIG="LAIN LOGIN CRAM-MD5 CRAM-SHA1 CRAM-SHA256"
POP3AUTH_TLS=""
POP3AUTH_TLS_ORIG="LOGIN PLAIN"
POP3_PROXY=0
PORT=110
ADDRESS=0
TCPDOPTS="-nodnslookup -noidentlookup"
LOGGEROPTS="-name=pop3d"
POP3DSTART=YES
MAILDIRPATH=Maildir

论坛徽章:
0
4 [报告]
发表于 2007-03-13 12:14 |只看该作者
问题还要自己来发现,来解决!!
自己搞定!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP