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