vmm
author martin f. krafft <madduck@madduck.net>
Sun, 15 Apr 2012 13:17:21 +0200
branchv0.6.x
changeset 555 499c63f52462
parent 366 d6573da35b5f
child 568 14abdd04ddf5
permissions -rwxr-xr-x
Provide list{addresses,aliases,users,relocated} subcommands The patch provides the list{addresses,aliases,users,relocated} subcommands to the UI. All commands actually take the same path in the code and only one query is run with different parameters for each case. There are still two shortcomings: 1. With alias domains, the output order is not as one might want it, e.g. foo@example.org bar@example.org foo@example.com bar@example.com when it should really be foo@ twice and then bar@ twice. I have not found a way to modify the SQL accordingly. 2. The SELECT queries for Accounts, Alias and Relocated are hard-coded in common.py.

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Copyright 2007 - 2011, Pascal Volk
# See COPYING for distribution information.

"""This is the vmm main script."""

import sys

if __name__ == '__main__':
    # replace the script's cwd (/usr/local/sbin) with our module dir
    # (the location of the VirtualMailManager directory)
    sys.path[0] = '/usr/local/lib/vmm'
    from VirtualMailManager.cli.main import run
    sys.exit(run(sys.argv))