Tag Archives: sasl

saslauthd LDAP

Install ports cyrus-sasl2-saslauthd. Jangan lupa dikompilasi agar support LDAP.

cd /usr/ports/security/cyrus-sasl2-saslauthd
make install clean

Edit konfigurasinya,

# contoh konfigurasi
# files: /usr/local/etc/saslauthd.conf
ldap_servers: ldap://localhost/
ldap_scope: sub
ldap_search_base: dc=gonicus,dc=de

Test imap:

ns# telnet localhost 143
Trying ::1...
Connected to localhost.
Escape character is '^]'.
* OK ns.comlabs.itb.ac.id Cyrus IMAP4 v2.2.3 server ready
001 login \"cecepmr\" \"cecepmr\"
001 OK User logged in
001 logout
* BYE LOGOUT received
001 OK Completed
Connection closed by foreign host.

Test pop3:

ns# telnet localhost 110
Trying ::1...
Connected to localhost.
Escape character is '^]'.
+OK ns.comlabs.itb.ac.id Cyrus POP3 v2.2.3 server ready
user cecepmr
+OK Name is a valid mailbox
pass cecepmr
+OK Mailbox locked and ready
+OK scan listing follows
telnet> q
Connection closed.



ldap_servers: ldap://localhost/
ldap_bind_dn: cn=imap,ou=Accounts,dc=CHANGE,dc=ME
ldap_bind_pw: secret
ldap_scope: sub
ldap_search_base: ou=Accounts,dc=CHANGE,dc=ME
ldap_auth_method: bind
ldap_filter: (&(uid=%u)(|(role=mailUser)(role=mailAdmin)))
ldap_group_dn: cn=%s,ou=MAILROLE,ou=Roles,dc=CHANGE,dc=ME