Commits

Zhang Huangbin  committed 476dfca

Fix incorrect value of storageBaseDirectory in tools/create_mail_user_OpenLDAP.py.

  • Participants
  • Parent commits 1f5cfb4

Comments (0)

Files changed (1)

File iRedMail/tools/create_mail_user_OpenLDAP.py

 
 # Storage base directory.
 STORAGE_BASE_DIRECTORY = '/var/vmail/vmail1'
-STORAGE_NODE = STORAGE_BASE_DIRECTORY.split('/')[-1]
+
+# Get base directory and storage node.
+std = STORAGE_BASE_DIRECTORY.rstrip('/').split('/')
+STORAGE_NODE = std.pop()
+STORAGE_BASE = '/'.join(std)
 
 # Hashed maildir: True, False.
 # Example:
     domain name, username, password, [common name], [quota], [groups]
 
 Example #1:
-    iredmail.org, zhang, secret_pw, Zhang Huangbin, 1024, group1:group2
+    iredmail.org, zhang, plain_password, Zhang Huangbin, 1024, group1:group2
 Example #2:
-    iredmail.org, zhang, secret_pw, Zhang Huangbin, ,
+    iredmail.org, zhang, plain_password, Zhang Huangbin, ,
 Example #3:
-    iredmail.org, zhang, secret_pw, , 1024, group1:group2
+    iredmail.org, zhang, plain_password, , 1024, group1:group2
      
 Note:
     - Domain name, username and password are REQUIRED, others are optional:
         ('cn',                  [cn]),
         ('sn',                  [username]),
         ('uid',                 [username]),
-        ('storageBaseDirectory', [STORAGE_BASE_DIRECTORY]),
+        ('storageBaseDirectory', [STORAGE_BASE]),
         ('mailMessageStore',    [mailMessageStore]),
         ('homeDirectory',       [homeDirectory]),
         ('accountStatus',       ['active']),