Guest User

Untitled

a guest
Dec 24th, 2017
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. # Router to send any mail for who a dovecot user exists to the appropriate maildir box
  2. # Routers are evaluated in order of configuration.
  3. # You will want to place this after the remote router and before the
  4. # localuser router in the default configuration.
  5. # If you want to allow + addressing (ie having an address extension)
  6. # then uncomment the suffix stanzas
  7. #dovecot_router:
  8. # driver = accept
  9. # local_part_suffix = +*
  10. # local_part_suffix_optional
  11. # require_files = +/home/dovecot/users/${local_part}/
  12. # transport = dovecot_transport
  13.  
  14. LDAP_AU_USER = uid=admin,dc=example,dc=com
  15.  
  16. #ldap_default_servers = localhost
  17. LDAP_DN_USER = user=cn=admin,dc=example,dc=com
  18. LDAP_DN_PASS = pass=secret
  19. LDAP_DC_BASE = dc=example,dc=com
  20. LDAP_OU_USERS = ou=Users
  21. LDAP_OU_GROUPS = ou=domainGroups
  22. LDAP_OU_ALIASES = ou=mailAliases
  23.  
  24. #ldap_aliases:
  25. # driver = redirect
  26. # domains = +local_domains
  27. # allow_fail
  28. # allow_defer
  29. # data = ${lookup ldap{LDAP_DN_USER LDAP_DN_PASS ldap:///LDAP_OU_ALIASES,LDAP_DC_BASE?rfc822MailMember?sub?(&(objectClass=nisMailAlias)(cn=${quote_ldap:$local_part}))}}
  30. # file_transport = address_file
  31. # pipe_transport = address_pipe
  32.  
  33. #ldap_groups_aliases:
  34. # driver = redirect
  35. # domains = +local_domains
  36. # data = ${lookup ldap{LDAP_DN_USER LDAP_DN_PASS ldap:///LDAP_OU_GROUPS,LDAP_DC_BASE?memberUID?sub?(&(cn=${quote_ldap:$local_part}))}}
  37. # file_transport = address_file
  38. # pipe_transport = address_pipe
  39. # allow_fail
  40. # allow_defer
  41.  
  42. ldap_user:
  43. driver = accept
  44. domains = +local_domains
  45. local_parts = ${lookup ldap{LDAP_DN_USER LDAP_DN_PASS ldap:///LDAP_OU_USERS,LDAP_DC_BASE?uid?sub?(&(objectclass=posixAccount)(uid=${quote_ldap:$local_part}))}}
  46. #user = mailnull
  47. #group = mail
  48. #transport = ldap_delivery
  49. user = vmail
  50. group = vmail
  51. transport = dovecot_deliver
  52. cannot_route_message = Unknown user
  53.  
  54. dovecot_router:
  55. debug_print = "R: ldap_local_user/dovecot_router for $local_part@$domain"
  56. driver = accept
  57. #domains = +ldap_local_domains
  58. domains = +local_domains
  59. #condition = LDAP_VIRT_COND
  60. condition = ${lookup ldap{LDAP_AU_USER LDAP_DN_PASS ldap://uid=$local_part,LDAP_OU_USERS,LDAP_DC_BASE}{yes}{no}}
  61. #router_home_directory = LDAP_VIRT_HOME
  62. #user = LDAP_VIRT_UID
  63. user= vmail
  64. #group = LDAP_VIRT_GID
  65. group = vmail
  66. local_part_suffix = +* : -*
  67. local_part_suffix_optional
  68. transport = dovecot_deliver
Add Comment
Please, Sign In to add comment