Zhang Huangbin avatar Zhang Huangbin committed 30af58b

* Add missing auth service in Dovecot-2: auth-userdb.
* Add new LDAP attribute and SQL column required by Dovecot-2 share folder:
enabledService=lib-storage (ldap), enablelib-storage=1 (SQL).
Thanks moreni <fmoreni _at_ simtrack.com.br> for the report.

Comments (0)

Files changed (8)

iRedMail/ChangeLog

     * Enforce connections over https in Roundcube.
     * Fix incorrect MySQL user password and databases in MySQL backup script.
     * Fixed:
-        + [ldap] Add new attribute/value required by Dovecot-2 share folder:
-          enabledService=lib-storage.
+        + Add missing auth service in Dovecot-2: auth-userdb.
+        + Add new LDAP attribute and SQL column required by Dovecot-2 share folder:
+          enabledService=lib-storage (ldap), enablelib-storage=1 (SQL).
           Thanks moreni <fmoreni _at_ simtrack.com.br> for the report.
         + [mysql & pgsql] Incorrect maildir path while using Postfix built-in
           'virtual' as transport.

iRedMail/dialog/virtual_domain_config.sh

 rm -f /tmp/first_domain_admin_passwd
 
 #FIRST_USER
-export FIRST_USER='www'
+export FIRST_USER='test'
 echo "export FIRST_USER='${FIRST_USER}'" >>${CONFIG_FILE}
 
 # FIRST_USER_PASSWD

iRedMail/functions/clamav.sh

     perl -pi -e 's#^(TCPAddr ).*#${1} $ENV{CLAMD_LISTEN_ADDR}#' ${CLAMD_CONF}
 
     # Disable log file
-    perl -pi -e 's/^(LogFile.*/#${1}/' ${CLAMD_CONF}
+    perl -pi -e 's/^(LogFile.*)/#${1}/' ${CLAMD_CONF}
 
     # Set CLAMD_LOCAL_SOCKET
     perl -pi -e 's/^(LocalSocket ).*/${1}$ENV{CLAMD_LOCAL_SOCKET}/' ${CLAMD_CONF}

iRedMail/functions/dovecot1.sh

 
         backup_file ${DOVECOT_MYSQL_CONF}
         cp -f ${SAMPLE_DIR}/dovecot/dovecot-sql.conf ${DOVECOT_MYSQL_CONF}
+        perl -pi -e 's#(.*mailbox.)(enable.*Lc)(=1)#${1}`${2}`${3}#' ${DOVECOT_MYSQL_CONF}
 
         perl -pi -e 's#PH_SQL_DRIVER#mysql#' ${DOVECOT_MYSQL_CONF}
         perl -pi -e 's#PH_SQL_SERVER#$ENV{MYSQL_SERVER}#' ${DOVECOT_MYSQL_CONF}

iRedMail/functions/dovecot2.sh

         backup_file ${DOVECOT_MYSQL_CONF}
         cp -f ${SAMPLE_DIR}/dovecot/dovecot-sql.conf ${DOVECOT_MYSQL_CONF}
         perl -pi -e 's/^#(iterate_.*)/${1}/' ${DOVECOT_MYSQL_CONF}
+        perl -pi -e 's#(.*mailbox.)(enable.*Lc)(=1)#${1}`${2}`${3}#' ${DOVECOT_MYSQL_CONF}
 
         perl -pi -e 's#PH_SQL_DRIVER#mysql#' ${DOVECOT_MYSQL_CONF}
         perl -pi -e 's#PH_SQL_SERVER#$ENV{MYSQL_SERVER}#' ${DOVECOT_MYSQL_CONF}
         else
             cp -f ${SAMPLE_DIR}/dovecot/dovecot-sql.conf ${DOVECOT_PGSQL_CONF}
         fi
+        perl -pi -e 's#(.*mailbox.)(enable.*Lc)(=1)#${1}"${2}"${3}#' ${DOVECOT_PGSQL_CONF}
         perl -pi -e 's/^#(iterate_.*)/${1}/' ${DOVECOT_PGSQL_CONF}
         perl -pi -e 's#PH_SQL_DRIVER#pgsql#' ${DOVECOT_PGSQL_CONF}
         perl -pi -e 's#PH_SQL_SERVER#$ENV{PGSQL_SERVER}#' ${DOVECOT_PGSQL_CONF}

iRedMail/samples/dovecot/dovecot2.conf

         group = PH_AUTH_MASTER_GROUP
         mode = 0666
     }
+    unix_listener auth-userdb {
+        user = PH_AUTH_MASTER_USER
+        group = PH_AUTH_MASTER_GROUP
+        mode = 0660
+    }
 }
 
 # Virtual mail accounts.

iRedMail/samples/iredmail.mysql

     enablesievesecured TINYINT(1) NOT NULL DEFAULT 1,
     enableinternal TINYINT(1) NOT NULL DEFAULT 1,
     enabledoveadm TINYINT(1) NOT NULL DEFAULT 1,
+    `enablelib-storage` TINYINT(1) NOT NULL DEFAULT 1,
     lastlogindate DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
     lastloginipv4 INT(4) UNSIGNED NOT NULL DEFAULT 0,
     lastloginprotocol CHAR(255) NOT NULL DEFAULT '',
     INDEX (enablesieve),
     INDEX (enablesievesecured),
     INDEX (enableinternal),
+    INDEX (enabledoveadm),
+    INDEX (`enablelib-storage`),
     INDEX (passwordlastchange),
     INDEX (expired),
     INDEX (active)

iRedMail/samples/iredmail.pgsql

     enablesievesecured INT2 NOT NULL DEFAULT 1,
     enableinternal INT2 NOT NULL DEFAULT 1,
     enabledoveadm INT2 NOT NULL DEFAULT 1,
+    "enablelib-storage" INT2 NOT NULL DEFAULT 1,
     lastlogindate TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT '1970-01-01 00:00:00',
     lastloginipv4 INET NOT NULL DEFAULT '0.0.0.0',
     lastloginprotocol CHAR(255) NOT NULL DEFAULT '',
 CREATE INDEX idx_mailbox_enablesieve ON mailbox (enablesieve);
 CREATE INDEX idx_mailbox_enablesievesecured ON mailbox (enablesievesecured);
 CREATE INDEX idx_mailbox_enableinternal ON mailbox (enableinternal);
+CREATE INDEX idx_mailbox_enabledoveadm ON mailbox (enabledoveadm);
+CREATE INDEX idx_mailbox_enablelib_storage ON mailbox ("enablelib-storage");
 CREATE INDEX idx_mailbox_passwordlastchange ON mailbox (passwordlastchange);
 CREATE INDEX idx_mailbox_expired ON mailbox (expired);
 CREATE INDEX idx_mailbox_active ON mailbox (active);
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.