Zhang Huangbin avatar Zhang Huangbin committed a132685

Don't require enabledService=smtp for maillist members.
Thanks rain6966 <uenuan@gmail> for the report.

Comments (0)

Files changed (3)

iRedMail/ChangeLog

 iRedMail-0.8.1:
     * Enforce connections over https in Roundcube.
     * Fix incorrect MySQL user password and databases in MySQL backup script.
+    * Fixed:
+        + [ldap] Don't require enabledService=smtp for maillist members.
+          Thanks rain6966 <uenuan@gmail> for the report.
 
 iRedMail-0.8.0:
     * It now works on OpenBSD. Tested with OpenBSD 5.1.

iRedMail/conf/postfix

 export ldap_virtual_mailbox_maps_cf="${POSTFIX_LOOKUP_DIR}/virtual_mailbox_maps.cf"
 export ldap_virtual_alias_maps_cf="${POSTFIX_LOOKUP_DIR}/virtual_alias_maps.cf"
 export ldap_virtual_group_maps_cf="${POSTFIX_LOOKUP_DIR}/virtual_group_maps.cf"
-export ldap_virtual_maillist_maps_cf="${POSTFIX_LOOKUP_DIR}/virtual_maillist_maps.cf"
+export ldap_virtual_group_members_maps_cf="${POSTFIX_LOOKUP_DIR}/virtual_group_members_maps.cf"
 export ldap_sender_login_maps_cf="${POSTFIX_LOOKUP_DIR}/sender_login_maps.cf"
 export ldap_recipient_bcc_maps_domain_cf="${POSTFIX_LOOKUP_DIR}/recipient_bcc_maps_domain.cf"
 export ldap_recipient_bcc_maps_user_cf="${POSTFIX_LOOKUP_DIR}/recipient_bcc_maps_user.cf"

iRedMail/functions/postfix.sh

     ldap_search_base_group="${LDAP_ATTR_GROUP_RDN}=${LDAP_ATTR_GROUP_GROUPS},${LDAP_ATTR_DOMAIN_RDN}=%d,${LDAP_BASEDN}"
 
     postconf -e transport_maps="proxy:ldap:${ldap_transport_maps_user_cf}, proxy:ldap:${ldap_transport_maps_domain_cf}"
-    postconf -e virtual_alias_maps="proxy:ldap:${ldap_virtual_alias_maps_cf}, proxy:ldap:${ldap_virtual_group_maps_cf}, proxy:ldap:${ldap_sender_login_maps_cf}, proxy:ldap:${ldap_catch_all_maps_cf}"
+    postconf -e virtual_alias_maps="proxy:ldap:${ldap_virtual_alias_maps_cf}, proxy:ldap:${ldap_virtual_group_maps_cf}, proxy:ldap:${ldap_virtual_group_members_maps_cf}, proxy:ldap:${ldap_catch_all_maps_cf}"
     postconf -e virtual_mailbox_domains="proxy:ldap:${ldap_virtual_mailbox_domains_cf}"
     postconf -e virtual_mailbox_maps="proxy:ldap:${ldap_virtual_mailbox_maps_cf}"
     postconf -e sender_bcc_maps="proxy:ldap:${ldap_sender_bcc_maps_domain_cf}, proxy:ldap:${ldap_sender_bcc_maps_user_cf}"
 debuglevel      = 0
 EOF
 
+    cat > ${ldap_virtual_group_members_maps_cf} <<EOF
+${CONF_MSG}
+server_host     = ${LDAP_SERVER_HOST}
+server_port     = ${LDAP_SERVER_PORT}
+version         = ${LDAP_BIND_VERSION}
+bind            = ${LDAP_BIND}
+start_tls       = no
+bind_dn         = ${LDAP_BINDDN}
+bind_pw         = ${LDAP_BINDPW}
+search_base     = ${LDAP_BASEDN}
+scope           = sub
+query_filter    = (&(objectClass=${LDAP_OBJECTCLASS_MAILUSER})(${LDAP_ATTR_ACCOUNT_STATUS}=${LDAP_STATUS_ACTIVE})(${LDAP_ENABLED_SERVICE}=${LDAP_SERVICE_MAIL})(|(${LDAP_ATTR_USER_RDN}=%s)(&(${LDAP_ENABLED_SERVICE}=${LDAP_SERVICE_SHADOW_ADDRESS})(${LDAP_ATTR_USER_SHADOW_ADDRESS}=%s))))
+result_attribute= ${LDAP_ATTR_USER_RDN}
+debuglevel      = 0
+EOF
+
     cat > ${ldap_catch_all_maps_cf} <<EOF
 ${CONF_MSG}
 server_host     = ${LDAP_SERVER_HOST}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.