歡迎您光臨本站 註冊首頁

通過ldap驗證,但是找不到用戶?

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

通過ldap驗證,但是找不到用戶?

網上有這個資料,我正在測試,但是問題多多啊。 郵件用戶都是ad上的用戶。
目前的情況是:
1.telnet 110 用戶驗證都通過了
2.telnet 25  正常輸出
3.發送郵件時候,看到smtp認證已經通過,但是找不到收件人這個用戶,請看下面日誌
Nov 27 11:45:11 mail postfix/smtpd: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Nov 27 11:45:19 mail postfix/smtpd: connect from unknown
Nov 27 11:45:19 mail postfix/smtpd: NOQUEUE: reject: RCPT from unknown: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<[email protected]> to=<[email protected]> proto=SMTP helo=<d>
Nov 27 11:45:19 mail postfix/smtpd: lost connection after RCPT from unknown
Nov 27 11:45:19 mail postfix/smtpd: disconnect from unknown
Nov 27 11:45:28 mail postfix/smtpd: connect from unknown
Nov 27 11:45:28 mail postfix/smtpd: NOQUEUE: reject: RCPT from unknown: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<d>
Nov 27 11:45:34 mail postfix/smtpd: lost connection after RCPT from unknown
Nov 27 11:45:34 mail postfix/smtpd: disconnect from unknown


4. 但是對收件人做測試時正常的
# postmap -q [email protected] ldap:/etc/postfix/ldap-users.cf
#

5. postfix的配置
readme_directory = no
myhostname = mail.sdys.com
mydomain = sdys.com
myorigin = $mydomain
mydestination = $myhostname,localhost.$mydomain,localhost
mynetworks = 127.0.0.0/8
home_mailbox = Maildir/
smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/run/dovecot/auth-client
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
broken_sasl_auth_clients = yes
virtual_mailbox_base = /data/vmail
virtual_mailbox_domains = $mydomain
virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
virtual_transport = virtual
virtual_uid_maps = static:505
virtual_gid_maps = static:501

6. ldap-users.cf
#        more /etc/postfix/ldap-users.cf
server_host = 10.167.53.242
search_base = dc=sdys,dc=com
version =3   
query_filter = (&(objectclass=person)(|(mail=%s)(othermailbox=%s))(!(userAccountControl=66050)))
bind=yes
bind_dn = [email protected]
bind_pw = abc123!
result_attribute= samaccountname
result_format = %s/Maildir/


實在想不出啊,為什麼找不到用戶呢?

[火星人 ] 通過ldap驗證,但是找不到用戶?已經有586次圍觀

http://coctec.com/docs/service/show-post-19761.html