vmm
author martin f. krafft <madduck@madduck.net>
Sun, 15 Apr 2012 17:51:00 +0200
branchv0.6.x
changeset 550 867d950ce7b7
parent 366 d6573da35b5f
child 568 14abdd04ddf5
permissions -rwxr-xr-x
Fix transport_maps function for non-existent domains The postfix_transport_maps function had a bug causing 2012-04-15 17:40:22 CEST LOG: statement: SELECT transport FROM postfix_transport_map('logcheck', 'domine.madduck.net'); 2012-04-15 17:40:22 CEST ERROR: query returned no rows when the domain was not in the database. This would make did be NULL and make the query fail. This patch moves the tid query until after a check for did. If the latter is NULL, the function RETURNs (rather than fails).

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