Advertisement
Guest User

Untitled

a guest
Aug 18th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. dn: uid=auser,ou=People,dc=example,dc=com
  2. cn: A User
  3. displayname: A User
  4. gecos: A User
  5. gidnumber: 1011
  6. givenname: A
  7. homedirectory: /home/auser
  8. host: host1
  9. host: host2
  10. host: host3
  11. host: host4
  12. mailacceptinggeneralid: root
  13. loginshell: /bin/bash
  14. mail: a.user@example.com
  15. objectclass: inetOrgPerson
  16. objectclass: posixAccount
  17. objectclass: shadowAccount
  18. objectclass: hostObject
  19. objectclass: postfixUser
  20. objectclass: top
  21. sn: User
  22. uid: auser
  23. uidnumber: 1001
  24.  
  25. server_host = ldap.example.com
  26. search_base = dc=example, dc=com
  27.  
  28. # look for entries with this
  29. query_filter = (|(uid=%s)(mailacceptinggeneralid=%s)(mail=%s@example.com))
  30.  
  31. # what attribute from the search result is returned
  32. result_attribute = mail
  33.  
  34. # the format in which the result is returned
  35. result_format = %s
  36.  
  37. # A query using the uid of the user
  38. postmap -q auser ldap:/etc/postfix/ldap-mail.cf
  39. a.user@example.com
  40.  
  41. # A query using the corporate username
  42. postmap -q a.user ldap:/etc/postfix/ldap-mail.cf
  43. a.user@example.com
  44.  
  45. # A query for a user specified in mailacceptinggeneralid
  46. postmap -q root ldap:/etc/postfix/ldap-mail.cf
  47. a.user@example.com
  48.  
  49. server_host = ldap.example.com
  50. search_base = dc=example, dc=com
  51. query_filter = (|(host=%3)(host=*))
  52. result_attribute = mail
  53. result_format = %s
  54.  
  55. postmap -q users@host2.example.com ldap:/etc/postfix/ldap-host-users.cf
  56. a.user@example.com
  57.  
  58. # The following also returns a list of email addresses, but shouldn't:
  59. postmap -q any_group@host2.example.com ldap:/etc/postfix/ldap-host-users.cf
  60. a.user@example.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement