|
|
@ -17,14 +17,15 @@ log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", "WARNING"))
|
|
|
|
|
|
|
|
|
|
|
|
def start_podop():
|
|
|
|
def start_podop():
|
|
|
|
os.setuid(100)
|
|
|
|
os.setuid(100)
|
|
|
|
|
|
|
|
url = "http://" + os.environ["ADMIN_ADDRESS"] + "/internal/postfix/"
|
|
|
|
# TODO: Remove verbosity setting from Podop?
|
|
|
|
# TODO: Remove verbosity setting from Podop?
|
|
|
|
run_server(0, "postfix", "/tmp/podop.socket", [
|
|
|
|
run_server(0, "postfix", "/tmp/podop.socket", [
|
|
|
|
("transport", "url", "http://admin/internal/postfix/transport/§"),
|
|
|
|
("transport", "url", url + "transport/§"),
|
|
|
|
("alias", "url", "http://admin/internal/postfix/alias/§"),
|
|
|
|
("alias", "url", url + "alias/§"),
|
|
|
|
("domain", "url", "http://admin/internal/postfix/domain/§"),
|
|
|
|
("domain", "url", url + "domain/§"),
|
|
|
|
("mailbox", "url", "http://admin/internal/postfix/mailbox/§"),
|
|
|
|
("mailbox", "url", url + "mailbox/§"),
|
|
|
|
("senderaccess", "url", "http://admin/internal/postfix/sender/access/§"),
|
|
|
|
("senderaccess", "url", url + "sender/access/§"),
|
|
|
|
("senderlogin", "url", "http://admin/internal/postfix/sender/login/§")
|
|
|
|
("senderlogin", "url", url + "sender/login/§")
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
def convert(src, dst):
|
|
|
|
def convert(src, dst):
|
|
|
@ -46,6 +47,7 @@ def resolve(hostname):
|
|
|
|
|
|
|
|
|
|
|
|
# Actual startup script
|
|
|
|
# Actual startup script
|
|
|
|
os.environ["FRONT_ADDRESS"] = resolve(os.environ.get("FRONT_ADDRESS", "front"))
|
|
|
|
os.environ["FRONT_ADDRESS"] = resolve(os.environ.get("FRONT_ADDRESS", "front"))
|
|
|
|
|
|
|
|
os.environ["ADMIN_ADDRESS"] = resolve(os.environ.get("ADMIN_ADDRESS", "admin"))
|
|
|
|
os.environ["HOST_ANTISPAM"] = os.environ.get("HOST_ANTISPAM", "antispam:11332")
|
|
|
|
os.environ["HOST_ANTISPAM"] = os.environ.get("HOST_ANTISPAM", "antispam:11332")
|
|
|
|
os.environ["HOST_LMTP"] = os.environ.get("HOST_LMTP", "imap:2525")
|
|
|
|
os.environ["HOST_LMTP"] = os.environ.get("HOST_LMTP", "imap:2525")
|
|
|
|
|
|
|
|
|
|
|
|