OpenLDAP/Services/Postfix
< OpenLDAP | Services
Версия от 20:28, 21 декабря 2008; Ilis (обсуждение | вклад)
OpenLDAP и Postfix
/etc/postfix/main.cf
alias_maps =ldap:/etc/postfix/ldapalias.cf virtual_transport = virtual virtual_mailbox_domains = solar.lan, ldap:/etc/postfix/ldapmydomains.cf #почта принимается для указанных здесь явно доменов и для доменов, найденных в лдап virtual_mailbox_base = /var/vmail virtual_mailbox_maps = ldap:/etc/postfix/ldapvirtual.cf virtual_uid_maps = static:500 virtual_gid_maps = static:500 virtual_minimum_uid = 500 virtual_mailbox_limit = 0 virtual_alias_maps = ldap:/etc/postfix/ldapalias.cf receive_override_options = no_address_mappings
/etc/postfix/ldapalias.cf
server_host = ldap.lan server_port = 389 bind = yes bind_dn = cn=postfix,ou=daemons,dc=ldap.lan bind_pw = postfix_pass search_base = ou=mail,dc=ldap.lan query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))(AccountStatus=active)) result_attribute = mail
/etc/postfix/ldapvirtual.cf
server_host = ldap.lan server_port = 389 bind = yes bind_dn = cn=postfix,ou=daemons,dc=ldap.lan bind_pw = postfix_pass search_base = ou=mail,dc=ldap.lan query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))(AccountStatus=active)) result_attribute = mailMessageStore
/etc/postfix/ldapmydomains.cf
search_base = ou=mail,dc=ldap.lan query_filter = (&(o=%s)(accountStatus=active)) result_attribute = o #domains_scope = one #domains_scope = sub #cache = yes bind = yes bind_dn = cn=postfix,ou=daemons,dc=ldap.lan bind_pw = postfix_pass server_host = ldap.lan server_port = 389