vmm.cfg: renamed maildir.folders to mailbox.folders. maildir.name v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Wed, 03 Mar 2010 20:23:18 +0000
branchv0.6.x
changeset 229 0fb2f12648a7
parent 228 a7b000ca4ac9
child 230 eefbe052a135
vmm.cfg: renamed maildir.folders to mailbox.folders. maildir.name was removed. new: mailbox.format, in order to support all mailbox formats from Dovecot. Maildir is the default format. Adjusted VirtualMailManager/Config and update_config.py to the changes mentioned above.
VirtualMailManager/Config.py
update_config.py
vmm.cfg
--- a/VirtualMailManager/Config.py	Wed Mar 03 14:32:30 2010 +0000
+++ b/VirtualMailManager/Config.py	Wed Mar 03 20:23:18 2010 +0000
@@ -336,9 +336,9 @@
                 'directory_mode': LCO(int, 504, self.getint),
                 'force_deletion': LCO(bool_t, False, self.getboolean),
             },
-            'maildir': {
+            'mailbox': {
                 'folders': LCO(str, 'Drafts:Sent:Templates:Trash', self.get),
-                'name': LCO(str, 'Maildir', self.get),
+                'format': LCO(str, 'maildir', self.get),
             },
             'misc': {
                 'base_directory': LCO(str, '/srv/mail', self.get, is_dir),
--- a/update_config.py	Wed Mar 03 14:32:30 2010 +0000
+++ b/update_config.py	Wed Mar 03 20:23:18 2010 +0000
@@ -75,7 +75,7 @@
     global had_config
 
     had_config = cp.remove_section('config')
-    add_sections(cp, ('domain', 'account'))
+    add_sections(cp, ('domain', 'account', 'mailbox'))
     if cp.has_section('domdir'):
         for src, dst in (('domdir.mode',   'domain.directory_mode'),
                          ('domdir.delete', 'domain.delete_directory'),
@@ -89,10 +89,12 @@
     for src, dst in (('maildir.mode',      'account.directory_mode'),
                      ('maildir.diskusage', 'account.disk_usage'),
                      ('maildir.delete',    'account.delete_directory'),
+                     ('maildir.folders',   'mailbox.folders'),
                      ('misc.forcedel',     'domain.force_deletion'),
                      ('misc.passwdscheme', 'misc.password_scheme'),
                      ('misc.dovecotvers',  'misc.dovecot_version')):
         move_option(cp, src, dst)
+    cp.remove_section('maildir')
 
 # def main():
 if __name__ == '__main__':
--- a/vmm.cfg	Wed Mar 03 14:32:30 2010 +0000
+++ b/vmm.cfg	Wed Mar 03 20:23:18 2010 +0000
@@ -16,12 +16,20 @@
 name = mailsys
 
 #
-# Maildir folder
+# mailbox settings
 #
-[maildir]
-; Default name of the Maildir folder (String)
-name = Maildir
-; A colon separated list of folder names, that should be created (String)
+[mailbox]
+; The mailbox format to be used for user's mailboxes. (String)
+; Depending on the used Dovecot version there are up to four supported formats:
+;    * maildir - since Dovecot v1.0.0
+;    * mbox    - since Dovecot v1.0.0
+;    * dbox    - since Dovecot v1.2.0
+;    * mdbox   - comes with Dovecot v2.0.0
+format = maildir
+; A colon separated list of mailbox names, that should be created (String)
+; Works currently only if the format is either 'maildir' or 'mbox' . For
+; other formats use Dovecot's Autocreate plugin:
+;	<http://wiki.dovecot.org/Plugins/Autocreate>
 ; e.g.: folders = Drafts:Sent:Templates:Trash:Lists.Dovecot:Lists.Postfix
 folders = Drafts:Sent:Templates:Trash