由 bigsw 在 09-29-2003 11:13 发表:
关于postfix的用户验证问题
最近一直在用postfix做邮件服务器,但做到用户验证这一块就进行不下去了
出现的问题:用户在内网,也就是postfix信任的网域,不需要通过任何验证都可以往其他任何域发送邮件; 但用户在外网,比如说通过拨号上网或在其他的局域网,不通过验证任可以发邮件给postfix所在的域,但往其他的域发邮件,就提示要通过smtp验证,但你给的任何一个postfix的用户名和密码都不能通过smtp的验证,错误号:535
我的测试环境:
Redhat 7.3 + Postfix-2.0.6.tar.gz + cyrus-sasl-1.5.24-25.i386.rpm
SMTP通过SASL1.5版中的pwcheck进行验证
我验证用户的过程:
用户名:mialuser
密码:abc
-----------------------------------------------------------
[root@sunw /]# printf 'test\0mailuser\0abc' | mmencode
dGVzdABzdW53ZWkAc3Vud2Vp
[root@sunw /]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 sunw.3322.org ESMTP Postfix
ehlo localhost
250-sunw.3322.org
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN <==出现这一行说明我的smtp已启动验证
250-XVERP
250 8BITMIME
auth plain dGVzdABzdW53ZWkAc3Vud2Vp
535 Error: authentication failed <==这就是令我痛苦的地方,每个用户都无法通过验证
quit
221 Bye
我的main.cf
------------------------------------------------------------
alias_maps = hash:/etc/postfix/aliases
debug_peer_level = 2
debugger_command =
PATH=/usr/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.0.6/samples
readme_directory = /etc/postfix/README_FILES
alias_database = hash:/etc/postfix/aliases
mydomain = 3322.org
myhostname = sunw.3322.org
myorigin = $mydomain
smtpd_sasl_auth_enable = yes
smtp_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,check_relay_domains
smtpd_client_re