„speedup commit“ ;-)
* 'VirtualMailManager/Account.py'
- Account.__init__() checks only the existence of an alias or relocated
record if there is no account with the supplied address yet
* 'VirtualMailManager/Alias.py'
- Alias.__init__() checks only the existence of an account or relocated
record if there is no alias with the supplied address yet
* 'VirtualMailManager/Relocated.py'
- Relocated.__init__() checks only the existence of an account or alias
record if there is no relocated user with the supplied address yet
* 'create_optional_types_and_functions.pgsql'
- Modified the 2nd part of postfix_smtpd_sender_login_map() in order to
save 0.3 ms
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Copyright 2008 VEB IT
# See COPYING for distribution information.
# $Id$
from ConfigParser import ConfigParser
from shutil import copy2
cf = '/usr/local/etc/vmm.cfg'
fh = file(cf, 'r')
cp = ConfigParser()
cp.readfp(fh)
fh.close()
if not cp.has_option('maildir', 'name') or not cp.has_option('maildir',
'folders') or cp.has_option('maildir', 'folder'):
copy2(cf, cf+'.bak_upd_0.4.x-0.5')
fh = file(cf, 'w')
if not cp.has_option('maildir', 'name'):
if cp.has_option('maildir', 'folder'):
cp.set('maildir', 'name', cp.get('maildir', 'folder'))
cp.remove_option('maildir', 'folder')
else:
cp.set('maildir', 'name', 'Maildir')
if not cp.has_option('maildir', 'folders'):
cp.set('maildir', 'folders', 'Drafts:Sent:Templates:Trash')
if cp.has_option('maildir', 'folder'):
cp.remove_option('maildir', 'folder')
cp.write(fh)
fh.close()