We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Maximum number of connections from user+IP exceeded 
Hi, we have a problem... :-)
We have changed the original value of "AUTH_RATELIMIT" to "AUTH_RATELIMIT=100/minute;6000/hour", but logs continue to say " Maximum number of connections from user+IP exceeded (mail_max_userip_connections=20)" while reading response from upstream..."
We have made docker-compose dow and docker-compose up -d, but without result.
How can we change the default limit set during the installation?
Thanks in advance.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `core/admin/mailu/internal/views/dovecot.py`
Content:
```
1 from mailu import models
2 from mailu.internal import internal
3 from flask import current_app as app
4 
5 import flask
6 import socket
7 import os
8 import sqlalchemy.exc
9 
10 @internal.route("/dovecot/passdb/<path:user_email>")
11 def dovecot_passdb_dict(user_email):
12     user = models.User.query.get(user_email) or flask.abort(404)
13     allow_nets = []
14     allow_nets.append(app.config["SUBNET"])
15     if app.config["SUBNET6"]:
16         allow_nets.append(app.config["SUBNET6"])
17     return flask.jsonify({
18         "password": None,
19         "nopassword": "Y",
20         "allow_nets": ",".join(allow_nets)
21     })
22 
23 @internal.route("/dovecot/userdb/")
24 def dovecot_userdb_dict_list():
25     return flask.jsonify([
26         user[0] for user in models.User.query.filter(models.User.enabled.is_(True)).with_entities(models.User.email).all()
27     ])
28 
29 @internal.route("/dovecot/userdb/<path:user_email>")
30 def dovecot_userdb_dict(user_email):
31     try:
32         quota = models.User.query.filter(models.User.email==user_email).with_entities(models.User.quota_bytes).one_or_none() or flask.abort(404)
33     except sqlalchemy.exc.StatementError as exc:
34         flask.abort(404)
35     return flask.jsonify({
36         "quota_rule": f"*:bytes={quota[0]}"
37     })
38 
39 
40 @internal.route("/dovecot/quota/<ns>/<path:user_email>", methods=["POST"])
41 def dovecot_quota(ns, user_email):
42     user = models.User.query.get(user_email) or flask.abort(404)
43     if ns == "storage":
44         user.quota_bytes_used = flask.request.get_json()
45         user.dont_change_updated_at()
46         models.db.session.commit()
47     return flask.jsonify(None)
48 
49 
50 @internal.route("/dovecot/sieve/name/<script>/<path:user_email>")
51 def dovecot_sieve_name(script, user_email):
52     return flask.jsonify(script)
53 
54 
55 @internal.route("/dovecot/sieve/data/default/<path:user_email>")
56 def dovecot_sieve_data(user_email):
57     user = models.User.query.get(user_email) or flask.abort(404)
58     return flask.jsonify(flask.render_template("default.sieve", user=user))
59
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/core/admin/mailu/internal/views/dovecot.py b/core/admin/mailu/internal/views/dovecot.py
--- a/core/admin/mailu/internal/views/dovecot.py
+++ b/core/admin/mailu/internal/views/dovecot.py
@@ -17,7 +17,7 @@
     return flask.jsonify({
         "password": None,
         "nopassword": "Y",
-        "allow_nets": ",".join(allow_nets)
+        "allow_real_nets": ",".join(allow_nets)
     })
 
 @internal.route("/dovecot/userdb/")

{"golden_diff": "diff --git a/core/admin/mailu/internal/views/dovecot.py b/core/admin/mailu/internal/views/dovecot.py\n--- a/core/admin/mailu/internal/views/dovecot.py\n+++ b/core/admin/mailu/internal/views/dovecot.py\n@@ -17,7 +17,7 @@\n     return flask.jsonify({\n         \"password\": None,\n         \"nopassword\": \"Y\",\n-        \"allow_nets\": \",\".join(allow_nets)\n+        \"allow_real_nets\": \",\".join(allow_nets)\n     })\n \n @internal.route(\"/dovecot/userdb/\")\n", "issue": "Maximum number of connections from user+IP exceeded \nHi, we have a problem... :-)\r\nWe have changed the original value of \"AUTH_RATELIMIT\" to \"AUTH_RATELIMIT=100/minute;6000/hour\", but logs continue to say \" Maximum number of connections from user+IP exceeded (mail_max_userip_connections=20)\" while reading response from upstream...\"\r\nWe have made docker-compose dow and docker-compose up -d, but without result.\r\nHow can we change the default limit set during the installation?\r\nThanks in advance.\n", "before_files": [{"content": "from mailu import models\nfrom mailu.internal import internal\nfrom flask import current_app as app\n\nimport flask\nimport socket\nimport os\nimport sqlalchemy.exc\n\n@internal.route(\"/dovecot/passdb/<path:user_email>\")\ndef dovecot_passdb_dict(user_email):\n    user = models.User.query.get(user_email) or flask.abort(404)\n    allow_nets = []\n    allow_nets.append(app.config[\"SUBNET\"])\n    if app.config[\"SUBNET6\"]:\n        allow_nets.append(app.config[\"SUBNET6\"])\n    return flask.jsonify({\n        \"password\": None,\n        \"nopassword\": \"Y\",\n        \"allow_nets\": \",\".join(allow_nets)\n    })\n\n@internal.route(\"/dovecot/userdb/\")\ndef dovecot_userdb_dict_list():\n    return flask.jsonify([\n        user[0] for user in models.User.query.filter(models.User.enabled.is_(True)).with_entities(models.User.email).all()\n    ])\n\n@internal.route(\"/dovecot/userdb/<path:user_email>\")\ndef dovecot_userdb_dict(user_email):\n    try:\n        quota = models.User.query.filter(models.User.email==user_email).with_entities(models.User.quota_bytes).one_or_none() or flask.abort(404)\n    except sqlalchemy.exc.StatementError as exc:\n        flask.abort(404)\n    return flask.jsonify({\n        \"quota_rule\": f\"*:bytes={quota[0]}\"\n    })\n\n\n@internal.route(\"/dovecot/quota/<ns>/<path:user_email>\", methods=[\"POST\"])\ndef dovecot_quota(ns, user_email):\n    user = models.User.query.get(user_email) or flask.abort(404)\n    if ns == \"storage\":\n        user.quota_bytes_used = flask.request.get_json()\n        user.dont_change_updated_at()\n        models.db.session.commit()\n    return flask.jsonify(None)\n\n\n@internal.route(\"/dovecot/sieve/name/<script>/<path:user_email>\")\ndef dovecot_sieve_name(script, user_email):\n    return flask.jsonify(script)\n\n\n@internal.route(\"/dovecot/sieve/data/default/<path:user_email>\")\ndef dovecot_sieve_data(user_email):\n    user = models.User.query.get(user_email) or flask.abort(404)\n    return flask.jsonify(flask.render_template(\"default.sieve\", user=user))\n", "path": "core/admin/mailu/internal/views/dovecot.py"}], "after_files": [{"content": "from mailu import models\nfrom mailu.internal import internal\nfrom flask import current_app as app\n\nimport flask\nimport socket\nimport os\nimport sqlalchemy.exc\n\n@internal.route(\"/dovecot/passdb/<path:user_email>\")\ndef dovecot_passdb_dict(user_email):\n    user = models.User.query.get(user_email) or flask.abort(404)\n    allow_nets = []\n    allow_nets.append(app.config[\"SUBNET\"])\n    if app.config[\"SUBNET6\"]:\n        allow_nets.append(app.config[\"SUBNET6\"])\n    return flask.jsonify({\n        \"password\": None,\n        \"nopassword\": \"Y\",\n        \"allow_real_nets\": \",\".join(allow_nets)\n    })\n\n@internal.route(\"/dovecot/userdb/\")\ndef dovecot_userdb_dict_list():\n    return flask.jsonify([\n        user[0] for user in models.User.query.filter(models.User.enabled.is_(True)).with_entities(models.User.email).all()\n    ])\n\n@internal.route(\"/dovecot/userdb/<path:user_email>\")\ndef dovecot_userdb_dict(user_email):\n    try:\n        quota = models.User.query.filter(models.User.email==user_email).with_entities(models.User.quota_bytes).one_or_none() or flask.abort(404)\n    except sqlalchemy.exc.StatementError as exc:\n        flask.abort(404)\n    return flask.jsonify({\n        \"quota_rule\": f\"*:bytes={quota[0]}\"\n    })\n\n\n@internal.route(\"/dovecot/quota/<ns>/<path:user_email>\", methods=[\"POST\"])\ndef dovecot_quota(ns, user_email):\n    user = models.User.query.get(user_email) or flask.abort(404)\n    if ns == \"storage\":\n        user.quota_bytes_used = flask.request.get_json()\n        user.dont_change_updated_at()\n        models.db.session.commit()\n    return flask.jsonify(None)\n\n\n@internal.route(\"/dovecot/sieve/name/<script>/<path:user_email>\")\ndef dovecot_sieve_name(script, user_email):\n    return flask.jsonify(script)\n\n\n@internal.route(\"/dovecot/sieve/data/default/<path:user_email>\")\ndef dovecot_sieve_data(user_email):\n    user = models.User.query.get(user_email) or flask.abort(404)\n    return flask.jsonify(flask.render_template(\"default.sieve\", user=user))\n", "path": "core/admin/mailu/internal/views/dovecot.py"}]}