update_config.py
branchv0.6.x
changeset 168 fd496561acc6
parent 167 bb58aedefa3a
child 181 866a6d679fce
equal deleted inserted replaced
167:bb58aedefa3a 168:fd496561acc6
    74 def upd_052(cp):
    74 def upd_052(cp):
    75     add_sections(cp, ('domain', 'account'))
    75     add_sections(cp, ('domain', 'account'))
    76     if cp.has_section('domdir'):
    76     if cp.has_section('domdir'):
    77         for src, dst in (('domdir.mode',   'domain.directory_mode'),
    77         for src, dst in (('domdir.mode',   'domain.directory_mode'),
    78                          ('domdir.delete', 'domain.delete_directory'),
    78                          ('domdir.delete', 'domain.delete_directory'),
    79                          ('domdir.base',   'misc.base_dir')):
    79                          ('domdir.base',   'misc.base_directory')):
    80             move_option(cp, src, dst)
    80             move_option(cp, src, dst)
    81         cp.remove_section('domdir')
    81         cp.remove_section('domdir')
    82     if cp.has_section('services'):
    82     if cp.has_section('services'):
    83         for service in cp.options('services'):
    83         for service in cp.options('services'):
    84             move_option(cp, 'services.%s'%service, 'account.%s'%service)
    84             move_option(cp, 'services.%s'%service, 'account.%s'%service)
    85         cp.remove_section('services')
    85         cp.remove_section('services')
    86     for src, dst in (('maildir.mode',      'account.directory_mode'),
    86     for src, dst in (('maildir.mode',      'account.directory_mode'),
    87                      ('maildir.diskusage', 'account.disk_usage'),
    87                      ('maildir.diskusage', 'account.disk_usage'),
    88                      ('maildir.delete',    'account.delete_directory'),
    88                      ('maildir.delete',    'account.delete_directory'),
    89                      ('misc.forcedel',     'domain.force_del'),
    89                      ('misc.forcedel',     'domain.force_deletion'),
    90                      ('misc.passwdscheme', 'misc.password_scheme'),
    90                      ('misc.passwdscheme', 'misc.password_scheme'),
    91                      ('misc.dovecotvers',  'misc.dovecot_vers')):
    91                      ('misc.dovecotvers',  'misc.dovecot_version')):
    92         move_option(cp, src, dst)
    92         move_option(cp, src, dst)
    93     for dst, val in (('account.random_password', 'false'),
    93     for dst, val in (('account.random_password', 'false'),
    94                      ('account.password_len',    '8'),
    94                      ('account.password_length', '8'),
    95                      ('domain.auto_postmaster',  'true')):
    95                      ('domain.auto_postmaster',  'true')):
    96         add_option(cp, dst, val)
    96         add_option(cp, dst, val)
    97 
    97 
    98 # def main():
    98 # def main():
    99 if __name__ == '__main__':
    99 if __name__ == '__main__':