update_config.py
branchv0.6.x
changeset 229 0fb2f12648a7
parent 181 866a6d679fce
child 264 04fea4d8b900
equal deleted inserted replaced
228:a7b000ca4ac9 229:0fb2f12648a7
    73 
    73 
    74 def upd_052(cp):
    74 def upd_052(cp):
    75     global had_config
    75     global had_config
    76 
    76 
    77     had_config = cp.remove_section('config')
    77     had_config = cp.remove_section('config')
    78     add_sections(cp, ('domain', 'account'))
    78     add_sections(cp, ('domain', 'account', 'mailbox'))
    79     if cp.has_section('domdir'):
    79     if cp.has_section('domdir'):
    80         for src, dst in (('domdir.mode',   'domain.directory_mode'),
    80         for src, dst in (('domdir.mode',   'domain.directory_mode'),
    81                          ('domdir.delete', 'domain.delete_directory'),
    81                          ('domdir.delete', 'domain.delete_directory'),
    82                          ('domdir.base',   'misc.base_directory')):
    82                          ('domdir.base',   'misc.base_directory')):
    83             move_option(cp, src, dst)
    83             move_option(cp, src, dst)
    87             move_option(cp, 'services.%s'%service, 'account.%s'%service)
    87             move_option(cp, 'services.%s'%service, 'account.%s'%service)
    88         cp.remove_section('services')
    88         cp.remove_section('services')
    89     for src, dst in (('maildir.mode',      'account.directory_mode'),
    89     for src, dst in (('maildir.mode',      'account.directory_mode'),
    90                      ('maildir.diskusage', 'account.disk_usage'),
    90                      ('maildir.diskusage', 'account.disk_usage'),
    91                      ('maildir.delete',    'account.delete_directory'),
    91                      ('maildir.delete',    'account.delete_directory'),
       
    92                      ('maildir.folders',   'mailbox.folders'),
    92                      ('misc.forcedel',     'domain.force_deletion'),
    93                      ('misc.forcedel',     'domain.force_deletion'),
    93                      ('misc.passwdscheme', 'misc.password_scheme'),
    94                      ('misc.passwdscheme', 'misc.password_scheme'),
    94                      ('misc.dovecotvers',  'misc.dovecot_version')):
    95                      ('misc.dovecotvers',  'misc.dovecot_version')):
    95         move_option(cp, src, dst)
    96         move_option(cp, src, dst)
       
    97     cp.remove_section('maildir')
    96 
    98 
    97 # def main():
    99 # def main():
    98 if __name__ == '__main__':
   100 if __name__ == '__main__':
    99     sect_opt = []
   101     sect_opt = []
   100     had_config = False
   102     had_config = False