Commits

Zhang Huangbin committed 8f8f39e

Sync tools/create_mail_user_MySQL.sh with conf/core.
Thanks kris_davison <black.road.gigs @gmail.com>.

Comments (0)

Files changed (1)

iRedMail/tools/create_mail_user_MySQL.sh

             fi
 
             # Use mbox, will be changed later.
-            maildir="${DOMAIN}/${str1}/${str1}${str2}/${str1}${str2}${str3}/${username}-${DATE}"
+            maildir="${DOMAIN}/${str1}/${str2}/${str3}/${username}-${DATE}"
         else
             # Use mbox, will be changed later.
             maildir="${DOMAIN}/${username}-${DATE}"
         fi
 
         cat >> ${SQL} <<EOF
-INSERT INTO mailbox (username, password, name, storagebasedirectory, maildir, quota, domain, active)
-    VALUES ('${mail}', '${CRYPT_PASSWD}', '${username}', '${STORAGE_BASE_DIRECTORY}', '${maildir}', '${DEFAULT_QUOTA}', '${DOMAIN}', '1');
-INSERT INTO alias (address, goto, created, active) VALUES ('${mail}', '${mail}', NOW(), 1);
+INSERT INTO mailbox (username, password, name, storagebasedirectory,storagenode, maildir, quota, domain, active, local_part, created)
+    VALUES ('${mail}', '${CRYPT_PASSWD}', '${username}', '${STORAGE_BASE_DIRECTORY}','${STORAGE_NODE}', '${maildir}', '${DEFAULT_QUOTA}', '${DOMAIN}', '1','${username}', NOW());
+INSERT INTO alias (address, goto, domain, created, active) VALUES ('${mail}', '${mail}','${DOMAIN}', NOW(), 1);
 EOF
     done
 }