better error message

master
Florent Daigniere 3 years ago
parent d6ce5d0c06
commit 6d244222da

@ -144,7 +144,7 @@ def postfix_sender_rate(sender):
""" Rate limit outbound emails per sender login """ Rate limit outbound emails per sender login
""" """
user = models.User.get(sender) or flask.abort(404) user = models.User.get(sender) or flask.abort(404)
return flask.abort(404) if user.sender_limiter.hit() else flask.jsonify("REJECT") return flask.abort(404) if user.sender_limiter.hit() else flask.jsonify("450 4.2.1 You are sending too many emails too fast.")
@internal.route("/postfix/sender/access/<path:sender>") @internal.route("/postfix/sender/access/<path:sender>")
def postfix_sender_access(sender): def postfix_sender_access(sender):

Loading…
Cancel
Save