update_config_0.3.x-0.4.py
author Pascal Volk <neverseen@users.sourceforge.net>
Tue, 15 Apr 2008 01:28:34 +0000
changeset 17 fe9be0081e5f
parent 14 ebc9b864bc9a
child 20 55146c78b3fb
permissions -rwxr-xr-x
* 'VirtualMailManager/VirtualMailManager.py' - implemented VirtualMailManager.user_transport() * 'vmm' * 'VirtualMailManager/Account.py' - Added code to modify user's transport

#!/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()