mirror of
https://github.com/Mailu/Mailu.git
synced 2024-12-12 10:45:38 +02:00
Handle relays as virtual transports through podop
This commit is contained in:
parent
9890e1fb2a
commit
f5668dea51
@ -35,11 +35,8 @@ def postfix_alias_map(alias):
|
||||
return flask.abort(404)
|
||||
|
||||
|
||||
@internal.route("/postfix/spoofed/<email>")
|
||||
def postfix_spoofed(email):
|
||||
return flask.abort(404)
|
||||
|
||||
|
||||
@internal.route("/postfix/transport/<email>")
|
||||
def postfix_transport(email):
|
||||
return flask.abort(404)
|
||||
localpart, domain = email.split('@', 1) if '@' in email else (None, email)
|
||||
relay = models.Relay.query.get(domain) or flask.abort(404)
|
||||
return flask.jsonify("smtp:[{}]".format(relay.smtp))
|
||||
|
@ -62,8 +62,8 @@ virtual_mailbox_domains = ${podop}domain
|
||||
virtual_mailbox_maps = ${podop}mailbox
|
||||
|
||||
# Mails are transported if required, then forwarded to Dovecot for delivery
|
||||
# relay_domains = ${podop}transport
|
||||
# transport_maps = ${podop}transport
|
||||
relay_domains = ${podop}transport
|
||||
transport_maps = ${podop}transport
|
||||
virtual_transport = lmtp:inet:{{ HOST_LMTP }}
|
||||
|
||||
# In order to prevent Postfix from running DNS query, enforce the use of the
|
||||
|
@ -17,7 +17,6 @@ def start_podop():
|
||||
("alias", "url", "http://admin/internal/postfix/alias/§"),
|
||||
("domain", "url", "http://admin/internal/postfix/domain/§"),
|
||||
("mailbox", "url", "http://admin/internal/postfix/mailbox/§"),
|
||||
("spoofed", "url", "http://admin/internal/postfix/spoofed/§"),
|
||||
])
|
||||
|
||||
convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ))
|
||||
|
Loading…
Reference in New Issue
Block a user