Commits

Zhang Huangbin committed f15d4e3

Fixed: Incorrect per-user mailbox quota if loggin in with shadowAddress. OpenLDAP backend only. Thanks tmihalicek <tomislav.mihalicek @gmail>.

Comments (0)

Files changed (3)

iRedMail/ChangeLog

 iRedMail-0.7.4:
-    * Fixed: Incorrect per-user sieve_dir setting in Dovecot.
-      Thanks cetex <oskar @cetex.se>.
+    * Fixed:
+      + Incorrect per-user mailbox quota if loggin in with shadowAddress.
+        OpenLDAP backend only. Thanks tmihalicek <tomislav.mihalicek @gmail>.
+      + Incorrect per-user sieve_dir setting in Dovecot.
+        Thanks cetex <oskar @cetex.se>.
     * LDA (Dovecot deliver) now will move SPAM to Junk folder by default.
     * Add missing INDEXes for Amavisd database: msgs.mail_id, (msgs.content,
       msgs.time_num), quarantine.mail_id.

iRedMail/functions/dovecot1.sh

 deref           = never
 user_filter     = (&(objectClass=${LDAP_OBJECTCLASS_MAILUSER})(${LDAP_ATTR_ACCOUNT_STATUS}=${LDAP_STATUS_ACTIVE})(${LDAP_ENABLED_SERVICE}=${LDAP_SERVICE_MAIL})(${LDAP_ENABLED_SERVICE}=%Ls%Lc)(|(${LDAP_ATTR_USER_RDN}=%u)(&(${LDAP_ENABLED_SERVICE}=${LDAP_SERVICE_SHADOW_ADDRESS})(${LDAP_ATTR_USER_SHADOW_ADDRESS}=%u))))
 pass_filter     = (&(objectClass=${LDAP_OBJECTCLASS_MAILUSER})(${LDAP_ATTR_ACCOUNT_STATUS}=${LDAP_STATUS_ACTIVE})(${LDAP_ENABLED_SERVICE}=${LDAP_SERVICE_MAIL})(${LDAP_ENABLED_SERVICE}=%Ls%Lc)(|(${LDAP_ATTR_USER_RDN}=%u)(&(${LDAP_ENABLED_SERVICE}=${LDAP_SERVICE_SHADOW_ADDRESS})(${LDAP_ATTR_USER_SHADOW_ADDRESS}=%u))))
-pass_attrs      = ${LDAP_ATTR_USER_PASSWD}=password
+pass_attrs      = mail=user,${LDAP_ATTR_USER_PASSWD}=password
 default_pass_scheme = CRYPT
 EOF
 
 
         # Maildir format.
         [ X"${MAILBOX_FORMAT}" == X"Maildir" ] && cat >> ${DOVECOT_LDAP_CONF} <<EOF
-user_attrs      = ${LDAP_ATTR_USER_HOME_DIRECTORY}=home,mailMessageStore=mail=maildir:${STORAGE_BASE_DIR}/%\$/Maildir/,${LDAP_ATTR_USER_QUOTA}=quota_rule=*:bytes=%\$
+user_attrs      = mail=user,${LDAP_ATTR_USER_HOME_DIRECTORY}=home,mailMessageStore=mail=maildir:${STORAGE_BASE_DIR}/%\$/Maildir/,${LDAP_ATTR_USER_QUOTA}=quota_rule=*:bytes=%\$
 EOF
 
     else

iRedMail/functions/dovecot2.sh

 scope           = subtree
 deref           = never
 user_filter     = (&(objectClass=${LDAP_OBJECTCLASS_MAILUSER})(${LDAP_ATTR_ACCOUNT_STATUS}=${LDAP_STATUS_ACTIVE})(${LDAP_ENABLED_SERVICE}=${LDAP_SERVICE_MAIL})(${LDAP_ENABLED_SERVICE}=%Ls%Lc)(|(${LDAP_ATTR_USER_RDN}=%u)(&(${LDAP_ENABLED_SERVICE}=${LDAP_SERVICE_SHADOW_ADDRESS})(${LDAP_ATTR_USER_SHADOW_ADDRESS}=%u))))
-user_attrs      = ${LDAP_ATTR_USER_HOME_DIRECTORY}=home,mailMessageStore=mail=maildir:${STORAGE_BASE_DIR}/%\$/Maildir/,${LDAP_ATTR_USER_QUOTA}=quota_rule=*:bytes=%\$
+user_attrs      = mail=user,${LDAP_ATTR_USER_HOME_DIRECTORY}=home,mailMessageStore=mail=maildir:${STORAGE_BASE_DIR}/%\$/Maildir/,${LDAP_ATTR_USER_QUOTA}=quota_rule=*:bytes=%\$
 pass_filter     = (&(objectClass=${LDAP_OBJECTCLASS_MAILUSER})(${LDAP_ATTR_ACCOUNT_STATUS}=${LDAP_STATUS_ACTIVE})(${LDAP_ENABLED_SERVICE}=${LDAP_SERVICE_MAIL})(${LDAP_ENABLED_SERVICE}=%Ls%Lc)(|(${LDAP_ATTR_USER_RDN}=%u)(&(${LDAP_ENABLED_SERVICE}=${LDAP_SERVICE_SHADOW_ADDRESS})(${LDAP_ATTR_USER_SHADOW_ADDRESS}=%u))))
-pass_attrs      = ${LDAP_ATTR_USER_PASSWD}=password
+pass_attrs      = mail=user,${LDAP_ATTR_USER_PASSWD}=password
 default_pass_scheme = CRYPT
 EOF