作者fxsh70133 (小峰)
看板FreeBSD
标题Re: [问题] sasl问题
时间Fri Jun 13 09:25:46 2008
> > 还是我要另外去设定?
> > 目前我试过本机使用者的帐密不行,想请问一下
> > 这边的帐密是在哪边设定的?
> 如果你走 pop3 的话,建议
> 1. 把 pop3 不走加密打开,用 telnet 去看讯息
> 2. 看 maillog 有没有写什麽东西
> 多看点错误讯息跟 log... 对於解决问题是很有帮助的
我先po一下我的过程
我安装了postfix+TLS+SASL2
postfix:
在/etc/rc.conf下加入
sendmail_enable="NONE"
postfix_enable="YES"
saslauthd_enable="YES"
在/etc/defaults/periodic.conf下加入
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
在/usr/local/etc/postfix/main.cf下加入
myhostname = harry2.dorm9.nctu.edu.tw
mydomain = dorm9.nctu.edu.tw
myorigin = $myhostname
mydestination = /usr/local/etc/postfix/mydestination
mynetworks_style = subnet
mynetworks = /usr/local/etc/postfix/mynetworks
alias_maps = hash:/etc/aliases
allow_mail_to_commands = alias,forward
allow_mail_to_files = alias,forward
tls:
制作CA凭证後,在/usr/local/etc/postfix/main.cf下加入
##TLS
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/ssl/server.pem
smtpd_tls_cert_file = /etc/ssl/server.pem
smtpd_tls_CAfile = /etc/ssl/server.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
sasl:
先灌sasl,
cd /usr/ports/security/cyrus-sasl-saslauthd
make install clean
在/etc/rc.conf下加入 saslauthd_enable="YES"
在/usr/local/etc/postfix/main.cf下加入
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
#smtpd_sasl_local_domain = $myhostname
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks
imap-uw:
cd /usr/ports/mail/imap-uw
make install clean
edit /etc/inetd.conf
pop3s stream tcp nowait root /usr/local/libexec/ipop3d ipop3d
imaps stream tcp nowait root /usr/local/libexec/imapd imapd
最後启动:
/usr/local/etc/rc.d/saslauthd start
/usr/local/etc/rc.d/postfix start
/etc/rc.d/inetd reload
我是用windows的outlook作测试
将内送邮件POP3和SMTP都设成自己的freebsd的hostname
外寄伺服器有勾验证及需要SSL连线的选项
然後我从
[email protected]寄到
[email protected]
当我要寄信的时候跳出这个画面
http://www.cs.nctu.edu.tw/~wfhsu/outlook.JPG

输入本机的使用者和密码後一直无法通过验证,网域我不知要填啥
接下来我去看maillog,出现以下讯息
Jun 13 03:14:35 harry2 postfix/master[30173]: daemon started -- version
2.4.6, configuration /usr/local/etc/postfix
Jun 13 03:15:40 harry2 postfix/smtpd[30188]: connect from
jack.Dorm9.NCTU.edu.tw[140.113.95.40]
Jun 13 03:15:40 harry2 postfix/smtpd[30188]: setting up TLS connection from
jack.Dorm9.NCTU.edu.tw[140.113.95.40]
Jun 13 03:15:40 harry2 postfix/smtpd[30188]: TLS connection established from
jack.Dorm9.NCTU.edu.tw[140.113.95.40]: TLSv1 with cipher RC4-MD5 (128/128
bits)
Jun 13 03:15:40 harry2 postfix/smtpd[30188]: warning: SASL authentication
failure: Could not open db
Jun 13 03:15:40 harry2 postfix/smtpd[30188]: warning: SASL authentication
failure: no secret in database
Jun 13 03:15:40 harry2 postfix/smtpd[30188]: warning:
jack.Dorm9.NCTU.edu.tw[140.113.95.40]: SASL NTLM authentication failed:
authentication failure
我之前也有用 telnet localhost 25
ehlo localhost 出现以下讯息
ehlo localhost
250-harry2.dorm9.nctu.edu.tw
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN NTLM LOGIN GSSAPI DIGEST-MD5 CRAM-MD5
250-AUTH=PLAIN NTLM LOGIN GSSAPI DIGEST-MD5 CRAM-MD5
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
想请问有没有人有遇过这种问题,感谢大家。
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.113.95.40
※ 编辑: fxsh70133 来自: 140.113.95.40 (06/13 09:26)