這又是應客戶需求添加的,
實做的環境是在 Redhat 當中.
1. 在 /etc/mail/sendmail.cf 加入以下內容:
O AuthMechanisms=LOGIN PLAIN
C{TrustAuthMech}LOGIN PLAIN
O DaemonPortOptions=Port=smtp, Name=MTA
2. 在 /etc/mail/mailertable 加入:
. esmtp:[ ip_addr
3. 在 /etc/sysconfig/saslauthd 修改以下參數:
MECH=ldap
FLAGS="-O /etc/saslauthd.conf"
4. 新增 /etc/saslauthd.conf , 加入以下內容:
ldap_servers: ldap://
ldap_version: 3
ldap_bind_dn: cn=dev,cn=Users,dc=example,dc=com,dc=tw
ldap_bind_pw: password
ldap_search_base: cn=Users,dc=example,dc=com,dc=tw #用來作為搜尋的基礎
ldap_auth_method: bind # 驗證的方式?
ldap_filter: samaccountname=%u # 過濾條件為何?
ldap_scope: sub # 搜尋的範圍為何?
5. 在 /usr/lib/sasl2/Sendmail.conf 當中加入:
pwcheck_method:saslauthd
mech_list:LOGIN PLAIN
然後重啟 saslauthd , sendmail try try!!
沒有留言:
張貼留言