mirror of
https://github.com/chatmail/relay.git
synced 2026-05-19 20:38:05 +00:00
simplify sysctl call
This commit is contained in:
@@ -184,19 +184,15 @@ def _configure_dovecot(mail_server: str, debug: bool = False) -> bool:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# as per https://doc.dovecot.org/configuration_manual/os/
|
# as per https://doc.dovecot.org/configuration_manual/os/
|
||||||
# it is recommended to set the following two inotify limits
|
# it is recommended to set the following inotify limits
|
||||||
server.sysctl(
|
for name in ("max_user_instances", "max_user_watches"):
|
||||||
name="Change the fs.inotify.max_user_instances",
|
key = f"fs.inotify.{name}"
|
||||||
key="fs.inotify.max_user_instances",
|
server.sysctl(
|
||||||
value=65535,
|
name=f"Change {key}",
|
||||||
persist=True,
|
key=key,
|
||||||
)
|
value=65535,
|
||||||
server.sysctl(
|
persist=True,
|
||||||
name="Change the fs.inotify.max_user_watches",
|
)
|
||||||
key="fs.inotify.max_user_watches",
|
|
||||||
value=65535,
|
|
||||||
persist=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
return need_restart
|
return need_restart
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user