doc/source/vmm_errors.rst
author martin f. krafft <madduck@madduck.net>
Wed, 11 Apr 2012 16:23:27 +0200
branchv0.6.x
changeset 518 5ec2068d02af
parent 216 0c8c053b451c
permissions -rw-r--r--
Enable interpolation of alias destinations This patch modifies the virtual_alias_maps function so that the destination address is parsed for the place holders %n, %d and %=, which are replaced with the localpart, the domain or the full address with '@' replaced by '=' of the queried key. In combination with alias domains, this allows for domain-specific recipients. E.g. given example.org and its alias domain example.com, defining an alias postmaster@example.org → postmaster+%d@example.org will cause mail to postmaster@example.*com* to go to postmaster+example.*com*@example.org.

:mod:`VirtualMailManager.errors` --- Exception classes
======================================================

.. module:: VirtualMailManager.errors
  :synopsis: Exception classes

.. moduleauthor:: Pascal Volk <neverseen@users.sourceforge.net>

.. toctree::
   :maxdepth: 2

Exceptions, used by VirtualMailManager's classes.


Exceptions
----------

.. exception:: VMMError(msg, code)

  Bases: :exc:`exceptions.Exception`

  :param msg: the error message
  :type msg: :obj:`basestring`
  :param code: the error code (one of :mod:`VirtualMailManager.constants.ERROR`)
  :type code: :obj:`int`

  Base class for all other Exceptions in the VirtualMailManager package.

  The *msg* and *code* are accessible via the both attributes:

  .. attribute:: msg

    The error message of the exception.


  .. attribute:: code

    The numerical error code of the exception.


.. exception:: ConfigError(msg, code)

  Bases: :exc:`VirtualMailManager.errors.VMMError`

  Exception class for configuration (:mod:`VirtualMailManager.Config`)
  exceptions.


.. exception:: PermissionError(msg, code)

  Bases: :exc:`VirtualMailManager.errors.VMMError`

  Exception class for file permission exceptions.


.. exception:: NotRootError(msg, code)

  Bases: :exc:`VirtualMailManager.errors.VMMError`

  Exception class for non-root exceptions.


.. exception:: DomainError(msg, code)

  Bases: :exc:`VirtualMailManager.errors.VMMError`

  Exception class for Domain (:mod:`VirtualMailManager.Domain`) exceptions.


.. exception:: AliasDomainError(msg, code)

  Bases: :exc:`VirtualMailManager.errors.VMMError`

  Exception class for AliasDomain (:mod:`VirtualMailManager.AliasDomain`)
  exceptions.


.. exception:: AccountError(msg, code)

  Bases: :exc:`VirtualMailManager.errors.VMMError`

  Exception class for Account (:mod:`VirtualMailManager.Account`) exceptions.


.. exception:: AliasError(msg, code)

  Bases: :exc:`VirtualMailManager.errors.VMMError`

  Exception class for Alias (:mod:`VirtualMailManager.Alias`) exceptions.


.. exception:: EmailAddressError(msg, code)

  Bases: :exc:`VirtualMailManager.errors.VMMError`

  Exception class for EmailAddress (:mod:`VirtualMailManager.EmailAddress`)
  exceptions.


.. exception:: MailLocationError(msg, code)

  Bases: :exc:`VirtualMailManager.errors.VMMError`

  Exception class for MailLocation (:mod:`VirtualMailManager.MailLocation`)
  exceptions.


.. exception:: RelocatedError(msg, code)

  Bases: :exc:`VirtualMailManager.errors.VMMError`

  Exception class for Relocated (:mod:`VirtualMailManager.Relocated`)
  exceptions.


.. exception:: TransportError(msg, code)

  Bases: :exc:`VirtualMailManager.errors.VMMError`

  Exception class for Transport (:mod:`VirtualMailManager.Transport`)
  exceptions.