mirror of
https://github.com/Mailu/Mailu.git
synced 2025-03-05 14:55:20 +02:00
Catch asterisk before resolve_domain
Asterisk results in IDNA error and a 500 return code.
This commit is contained in:
parent
ed81c076f2
commit
eff6c34632
@ -27,6 +27,8 @@ def postfix_alias_map(alias):
|
||||
|
||||
@internal.route("/postfix/transport/<email>")
|
||||
def postfix_transport(email):
|
||||
if email == '*':
|
||||
return flask.abort(404)
|
||||
localpart, domain_name = models.Email.resolve_domain(email)
|
||||
relay = models.Relay.query.get(domain_name) or flask.abort(404)
|
||||
return flask.jsonify("smtp:[{}]".format(relay.smtp))
|
||||
|
Loading…
x
Reference in New Issue
Block a user