vmm.cfg: dealt with the most overdue section/option renaming.
Added new options. Details:
old new
------------------------------------------------------------
domdir.mode -> domain.directory_mode
domdir.delete -> domain.delete_directory
domdir.base -> misc.base_dir
domdir -> _section domdir deleted_
maildir.mode -> account.directory_mode
maildir.diskusage -> account.disk_usage
maildir.delete -> account.delete_directory
misc.forcedel -> domain.force_del
misc.passwdscheme -> misc.password_scheme
misc.dovecotvers -> misc.dovecot_vers
services.smtp -> account.smtp
services.pop3 -> account.pop3
services.imap -> account.imap
services.sieve -> account.sieve
services -> _section services deleted_
_NEW_.random_password -> account.random_password
_NEW_.password_len -> account.password_len
_NEW_.auto_postmaster -> domain.auto_postmaster
# -*- coding: UTF-8 -*-
# Copyright (c) 2007 - 2010, Pascal Volk
# See COPYING for distribution information.
"""Exception classes for Virtual Mail Manager"""
class VMMException(Exception):
"""Exception class for VirtualMailManager exceptions"""
def __init__(self, msg, code):
Exception.__init__(self, msg)
self._code = int(code)
### for older python versions, like py 2.4.4 on OpenBSD 4.2
if not hasattr(self, 'message'):
self.message = msg
def msg(self):
"""Returns the exception message."""
return self.message
def code(self):
"""Returns the numeric exception error code."""
return self._code
class VMMConfigException(VMMException):
"""Exception class for Configurtion exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
class VMMPermException(VMMException):
"""Exception class for permissions exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
class VMMNotRootException(VMMException):
"""Exception class for non-root exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
class VMMDomainException(VMMException):
"""Exception class for Domain exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
class VMMAliasDomainException(VMMException):
"""Exception class for AliasDomain exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
class VMMAccountException(VMMException):
"""Exception class for Account exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
class VMMAliasException(VMMException):
"""Exception class for Alias exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
class VMMEmailAddressException(VMMException):
"""Exception class for EmailAddress exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
class VMMMailLocationException(VMMException):
"""Exception class for MailLocation exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
class VMMRelocatedException(VMMException):
"""Exception class for Relocated exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)
class VMMTransportException(VMMException):
"""Exception class for Transport exceptions"""
def __init__(self, msg, code):
VMMException.__init__(self, msg, code)