LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1037|回复: 2

postfix配置smtp 认证错误[已解决]

[复制链接]
发表于 2004-12-27 19:53:23 | 显示全部楼层 |阅读模式
采用postfix+cyrus sasl 进行smtp认证,总是没办法运作起来。

在/var/log/mail/errors中提示:postfix/smtpd[10881]: fatal: no SASL authentication mechanisms

main.cf 内容如下:
#================================================
# These are changed by postfix install script
readme_directory = /usr/share/doc/postfix-2.1.4/README_FILES
sample_directory = /usr/share/doc/postfix-2.1.4/samples
html_directory = /usr/share/doc/postfix-2.1.4/html
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/lib/postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix

# User configurable parameters

mynetworks_style = host
delay_warning_time = 4h
smtpd_banner = $mydomain ESMTP $mail_name
unknown_local_recipient_reject_code = 450
smtp-filter_destination_concurrency_limit = 2
lmtp-filter_destination_concurrency_limit = 2
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
myhostname = mail.mydomain.com
mydomain=mydomain.com
mydestination = $myhostname, localhost.$mydomain, $mydomain
virtual_maps = hash:/etc/postfix/virtual
canonical_maps = hash:/etc/postfix/canonical
myorigin = mydomain.com
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases

#Enable sasl authentication smtp
smtpd_sasl_application_name = smtpd
smtpd_delay_reject= yes
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients= yes
smtp_sasl_auth_enable = yes

#把下面这一行注释以后postfix收发邮件正常,但是smtp认证就没了
smtpd_sasl_auth_enable = yes

#=====================end of main.cf

# /usr/lib/sasl2/smtpd.conf内容:
pwcheck_method: saslauthd

看了本版面的所有文章,也在google上搜索了很久,一直不得其解;
希望哪位高手能帮我一下!!谢谢
 楼主| 发表于 2004-12-27 20:40:57 | 显示全部楼层
最终还得靠自己

从log看就是缺了验证算法机制,估计是sasl某个库没装上。(我用MDK10.1,rpm包和source均缺少这个包)。

去光盘search一下,看到libsasl2-plug的统统装上~
ok,test again:
[biabia@master biabia]$ telnet localhost 25
Trying 127.0.0.1...
Connected to master.mydomain.com (127.0.0.1).
Escape character is '^]'.
220 mydomain.com ESMTP Postfix
ehlo
501 Syntax: EHLO hostname
ehlo localhost
250-mail.mydomain.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH GSSAPI CRAM-MD5 DIGEST-MD5 LOGIN PLAIN NTLM SRP OTP
250-AUTH=GSSAPI CRAM-MD5 DIGEST-MD5 LOGIN PLAIN NTLM SRP OTP
250 8BITMIME


基本上smtp认证就ok了
发表于 2005-5-11 15:43:57 | 显示全部楼层
楼主,这样行不??
我也出现了
  1. 250-AUTH GSSAPI CRAM-MD5 DIGEST-MD5 LOGIN PLAIN NTLM SRP OTP
  2. 250-AUTH=GSSAPI CRAM-MD5 DIGEST-MD5 LOGIN PLAIN NTLM SRP OTP
复制代码

但是,没有办法登陆,提示密码错误!!请指教
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表