update_config_0.3.x-0.4.py
author Pascal Volk <neverseen@users.sourceforge.net>
Thu, 10 Apr 2008 03:24:12 +0000
changeset 15 1607f7b2dba9
parent 14 ebc9b864bc9a
child 20 55146c78b3fb
permissions -rwxr-xr-x
* 'update_config_0.3.x-0.4.py' - fixed code for view dovecot_user * 'create_tables.pgsql' - updated view dovecot_user (extra field »mail«) * 'UPGRADE' - fixed filename (update_0.3.x-0.4.sh -> upgrade.sh) - added hints for view perms and user_query * 'INSTALL' - replaced mail_extra_groups with mail_privileged_group - updated user_query

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Copyright 2008 VEB IT
# See COPYING for distribution information.
# $Id$

from ConfigParser import ConfigParser

cff = file('/usr/local/etc/vmm.cfg', 'r')
cf = ConfigParser()
cf.readfp(cff)
cff.close()
if not cf.has_option('misc', 'transport'):
    cff = file('/usr/local/etc/vmm.cfg', 'w')
    cf.set('misc', 'transport', 'dovecot:')
    cf.write(cff)
    cff.close()