Commits

Zhang Huangbin committed 9bdcc84

Better support for 'doveadm mailbox ...'.

  • Participants
  • Parent commits f0e7e84

Comments (0)

Files changed (2)

iRedMail/functions/dovecot2.sh

     if [ X"${BACKEND}" == X"OPENLDAP" ]; then
         backup_file ${DOVECOT_LDAP_CONF}
         cp -f ${SAMPLE_DIR}/dovecot/dovecot-ldap.conf ${DOVECOT_LDAP_CONF}
+        perl -pi -e 's/^#(iterate_.*)/${1}/' ${DOVECOT_LDAP_CONF}
 
         perl -pi -e 's#PH_LDAP_SERVER_HOST#$ENV{LDAP_SERVER_HOST}#' ${DOVECOT_LDAP_CONF}
         perl -pi -e 's#PH_LDAP_SERVER_PORT#$ENV{LDAP_SERVER_PORT}#' ${DOVECOT_LDAP_CONF}

iRedMail/samples/dovecot/dovecot-ldap.conf

 base            = PH_LDAP_BASEDN
 scope           = subtree
 deref           = never
+
+# Below two are required by command 'doveadm mailbox ...'
+#iterate_attrs   = mail=user
+#iterate_filter  = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail))
+
 user_filter     = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
 user_attrs      = mail=user,homeDirectory=home,mailMessageStore=mail=maildir:PH_STORAGE_BASE_DIR/%$/Maildir/,mailQuota=quota_rule=*:bytes=%$
 pass_filter     = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))