configuration: Dropped setting misc.gid_mail. v0.6.x
authorPascal Volk <neverseen@users.sourceforge.net>
Wed, 28 Apr 2010 05:28:36 +0000
branchv0.6.x
changeset 270 d3389645a91d
parent 269 188ea8d6072f
child 271 e915d4725706
configuration: Dropped setting misc.gid_mail. That setting was never useful, since none of the virtual users was a member of a system group.
VirtualMailManager/Config.py
VirtualMailManager/Handler.py
man/de/man5/vmm.cfg.5.rst
man/man5/vmm.cfg.5.rst
update_config.py
vmm.cfg
--- a/VirtualMailManager/Config.py	Wed Apr 28 04:12:29 2010 +0000
+++ b/VirtualMailManager/Config.py	Wed Apr 28 05:28:36 2010 +0000
@@ -345,7 +345,6 @@
                 'base_directory': LCO(str, '/srv/mail', self.get, is_dir),
                 'dovecot_version': LCO(str, '1.2.11', self.hexversion,
                                        check_version_format),
-                'gid_mail': LCO(int, 8, self.getint),
                 'password_scheme': LCO(str, 'CRAM-MD5', self.get,
                                        self.known_scheme),
                 'transport': LCO(str, 'dovecot:', self.get),
--- a/VirtualMailManager/Handler.py	Wed Apr 28 04:12:29 2010 +0000
+++ b/VirtualMailManager/Handler.py	Wed Apr 28 05:28:36 2010 +0000
@@ -110,7 +110,7 @@
         if not os.path.exists(basedir):
             old_umask = os.umask(0006)
             os.makedirs(basedir, 0771)
-            os.chown(basedir, 0, self._Cfg.dget('misc.gid_mail'))
+            os.chown(basedir, 0, 0)
             os.umask(old_umask)
         elif not os.path.isdir(basedir):
             raise VMMError(_(u'“%s” is not a directory.\n\
@@ -230,8 +230,7 @@
 
         os.chdir(basedir)
         if not os.path.isdir(domdirdirs[0]):
-            self.__makedir(domdirdirs[0], 489, 0,
-                           self._Cfg.dget('misc.gid_mail'))
+            self.__makedir(domdirdirs[0], 489, 0, 0)
         os.chdir(domdirdirs[0])
         os.umask(0007)
         self.__makedir(domdirdirs[1], self._Cfg.dget('domain.directory_mode'),
--- a/man/de/man5/vmm.cfg.5.rst	Wed Apr 28 04:12:29 2010 +0000
+++ b/man/de/man5/vmm.cfg.5.rst	Wed Apr 28 05:28:36 2010 +0000
@@ -362,12 +362,6 @@
   Passwort-Schemata zu erhalten, für Sie das Kommando **dovecotpw -l**
   (Dovecot v1.x) oder **doveadm pw -l** (Dovecot v2.0) aus.
 
-.. _misc.gid_mail:
-
-``gid_mail (Vorgabe: 8)`` : *Int*
-  Die numerische Gruppen-ID der Gruppe mail, bzw. der Gruppe aus
-  `mail_privileged_group` der Datei *dovecot.conf*.
-
 .. _misc.transport:
 
 ``transport (Vorgabe: dovecot:)`` : *String*
@@ -388,7 +382,6 @@
   [misc]
   base_directory = /srv/mail
   password_scheme = PLAIN
-  gid_mail = 8
   transport = dovecot:
   dovecot_version = 2.0.beta4
 
--- a/man/man5/vmm.cfg.5.rst	Wed Apr 28 04:12:29 2010 +0000
+++ b/man/man5/vmm.cfg.5.rst	Wed Apr 28 05:28:36 2010 +0000
@@ -346,12 +346,6 @@
   execute the command **dovecotpw -l** (Dovecot v1.x) or **doveadm pw -l**
   (Dovecot v2.0).
 
-.. _misc.gid_mail:
-
-``gid_mail (default: 8)`` : *Int*
-  Numeric group ID of group mail (`mail_privileged_group` from
-  *dovecot.conf*)
-
 .. _misc.transport:
 
 ``transport (default: dovecot:)`` : *String*
@@ -372,7 +366,6 @@
   [misc]
   base_directory = /srv/mail
   password_scheme = PLAIN
-  gid_mail = 8
   transport = dovecot:
   dovecot_version = 2.0.beta4
 
--- a/update_config.py	Wed Apr 28 04:12:29 2010 +0000
+++ b/update_config.py	Wed Apr 28 05:28:36 2010 +0000
@@ -85,8 +85,10 @@
 
 def upd_052(cp):
     global had_config
+    global had_gid_mail
 
     had_config = cp.remove_section('config')
+    had_gid_mail = cp.remove_option('misc', 'gid_mail')
     add_sections(cp, ('domain', 'account', 'mailbox'))
     if cp.has_section('domdir'):
         for src, dst in (('domdir.mode',   'domain.directory_mode'),
@@ -114,18 +116,25 @@
 if __name__ == '__main__':
     sect_opt = []
     had_config = False
+    had_gid_mail = False
     cf = get_config_file()
     cp = get_cfg_parser(cf)
     update(cp)
     if len(sect_opt):
-        had_config = False
         update_cfg_file(cp, cf)
         sect_opt.sort()
         print 'Please have a look at your configuration: %s' %cf
         print 'This are your Modified/Renamed/New settings:'
         for s_o, st in sect_opt:
             print '%s   %s = %s' % (st, s_o, get_option(cp, s_o))
-    if had_config:
+        if had_config:
+            print '\nRemoved section "config" with option "done" (obsolte)'
+        if had_gid_mail:
+            print '\nRemoved option "gid_mail" from section "misc" (obsolte)\n'
+        os.sys.exit(0)
+    if had_config or had_gid_mail:
         update_cfg_file(cp, cf)
-        print 'Removed section "config" with option "done" (obsolte)'
-        print
+        if had_config:
+            print '\nRemoved section "config" with option "done" (obsolte)'
+        if had_gid_mail:
+            print '\nRemoved option "gid_mail" from section "misc" (obsolte)\n'
--- a/vmm.cfg	Wed Apr 28 04:12:29 2010 +0000
+++ b/vmm.cfg	Wed Apr 28 05:28:36 2010 +0000
@@ -92,17 +92,9 @@
 base_directory = /srv/mail
 ; Password scheme to use (see also: dovecotpw -l) (String)
 password_scheme = CRAM-MD5
-; numeric group ID of group mail (mail_privileged_group from dovecot.conf) (Int)
-gid_mail = 8
 ; default transport for domains and accounts (String)
 transport = dovecot:
 ; the version number from `dovecot --version` (String)
 ; e.g. 1.1.18; 1.2.11; 2.0.beta4
 dovecot_version = 1.2.11
 
-#
-# Configuration state
-#
-[config]
-; finally set this to true (Boolean)
-done = false