mirror of
https://github.com/chatmail/relay.git
synced 2026-05-11 16:34:39 +00:00
Compare commits
8 Commits
link2xt/de
...
metadata_r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
609b9ef494 | ||
|
|
b5b9f867db | ||
|
|
7359ccb591 | ||
|
|
a67c1b9cc5 | ||
|
|
64bc8dbcc6 | ||
|
|
8928cb8816 | ||
|
|
aca4b1a4da | ||
|
|
4523c09738 |
@@ -15,7 +15,6 @@ import requests
|
|||||||
|
|
||||||
|
|
||||||
DICTPROXY_LOOKUP_CHAR = "L"
|
DICTPROXY_LOOKUP_CHAR = "L"
|
||||||
DICTPROXY_ITERATE_CHAR = "I"
|
|
||||||
DICTPROXY_SET_CHAR = "S"
|
DICTPROXY_SET_CHAR = "S"
|
||||||
DICTPROXY_BEGIN_TRANSACTION_CHAR = "B"
|
DICTPROXY_BEGIN_TRANSACTION_CHAR = "B"
|
||||||
DICTPROXY_COMMIT_TRANSACTION_CHAR = "C"
|
DICTPROXY_COMMIT_TRANSACTION_CHAR = "C"
|
||||||
@@ -75,10 +74,6 @@ def handle_dovecot_request(msg, transactions, notifier):
|
|||||||
parts = msg[1:].split("\t")
|
parts = msg[1:].split("\t")
|
||||||
if short_command == DICTPROXY_LOOKUP_CHAR:
|
if short_command == DICTPROXY_LOOKUP_CHAR:
|
||||||
return "N\n"
|
return "N\n"
|
||||||
elif short_command == DICTPROXY_ITERATE_CHAR:
|
|
||||||
# Empty line means ITER_FINISHED.
|
|
||||||
# If we don't return empty line Dovecot will timeout.
|
|
||||||
return "\n"
|
|
||||||
|
|
||||||
if short_command not in (DICTPROXY_TRANSACTION_CHARS):
|
if short_command not in (DICTPROXY_TRANSACTION_CHARS):
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -70,21 +70,6 @@ def test_handle_dovecot_protocol_set_devicetoken():
|
|||||||
assert wfile.getvalue() == b"O\n"
|
assert wfile.getvalue() == b"O\n"
|
||||||
|
|
||||||
|
|
||||||
def test_handle_dovecot_protocol_iterate():
|
|
||||||
rfile = io.BytesIO(
|
|
||||||
b"\n".join(
|
|
||||||
[
|
|
||||||
b"H",
|
|
||||||
b"I9\t0\tpriv/5cbe730f146fea6535be0d003dd4fc98/\tci-2dzsrs@nine.testrun.org",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
wfile = io.BytesIO()
|
|
||||||
notifier = Notifier()
|
|
||||||
handle_dovecot_protocol(rfile, wfile, notifier)
|
|
||||||
assert wfile.getvalue() == b"\n"
|
|
||||||
|
|
||||||
|
|
||||||
def test_handle_dovecot_protocol_messagenew():
|
def test_handle_dovecot_protocol_messagenew():
|
||||||
rfile = io.BytesIO(
|
rfile = io.BytesIO(
|
||||||
b"\n".join(
|
b"\n".join(
|
||||||
|
|||||||
@@ -471,10 +471,6 @@ def deploy_chatmail(config_path: Path) -> None:
|
|||||||
apt.update(name="apt update", cache_time=24 * 3600)
|
apt.update(name="apt update", cache_time=24 * 3600)
|
||||||
server.group(name="Create vmail group", group="vmail", system=True)
|
server.group(name="Create vmail group", group="vmail", system=True)
|
||||||
server.user(name="Create vmail user", user="vmail", group="vmail", system=True)
|
server.user(name="Create vmail user", user="vmail", group="vmail", system=True)
|
||||||
apt.packages(
|
|
||||||
name="Install rsync",
|
|
||||||
packages=["rsync"],
|
|
||||||
)
|
|
||||||
|
|
||||||
# Run local DNS resolver `unbound`.
|
# Run local DNS resolver `unbound`.
|
||||||
# `resolvconf` takes care of setting up /etc/resolv.conf
|
# `resolvconf` takes care of setting up /etc/resolv.conf
|
||||||
|
|||||||
@@ -13,12 +13,6 @@ auth_cache_size = 100M
|
|||||||
mail_debug = yes
|
mail_debug = yes
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# Prevent warnings similar to:
|
|
||||||
# config: Warning: service auth { client_limit=1000 } is lower than required under max. load (10200). Counted for protocol services with service_count != 1: service lmtp { process_limit=100 } + service imap-urlauth-login { process_limit=100 } + service imap-login { process_limit=10000 }
|
|
||||||
# config: Warning: service anvil { client_limit=1000 } is lower than required under max. load (10103). Counted with: service imap-urlauth-login { process_limit=100 } + service imap-login { process_limit=10000 } + service auth { process_limit=1 }
|
|
||||||
# master: Warning: service(stats): client_limit (1000) reached, client connections are being dropped
|
|
||||||
default_client_limit = 20000
|
|
||||||
|
|
||||||
mail_server_admin = mailto:root@{{ config.mail_domain }}
|
mail_server_admin = mailto:root@{{ config.mail_domain }}
|
||||||
mail_server_comment = Chatmail server
|
mail_server_comment = Chatmail server
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user