Skip to content

Commit 953bdd3

Browse files
Keonik1missytake
authored andcommitted
cmdeploy: Add config parameters change_kernel_settings and fs_inotify_max_user_instances_and_watchers
1 parent b1f15ae commit 953bdd3

File tree

5 files changed

+23
-0
lines changed

5 files changed

+23
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@
8989
- Add installation via docker compose (MVP 1). The instructions, known issues and limitations are located in `/docs`
9090
([#614](https://github.com/chatmail/relay/pull/614))
9191

92+
- Add configuration parameters
93+
([#614](https://github.com/chatmail/relay/pull/614)):
94+
- `change_kernel_settings` - Whether to change kernel parameters during installation (default: `True`)
95+
- `fs_inotify_max_user_instances_and_watchers` - Value for kernel parameters `fs.inotify.max_user_instances` and `fs.inotify.max_user_watches` (default: `65535`)
96+
9297
## 1.7.0 2025-09-11
9398

9499
- Make www upload path configurable

chatmaild/src/chatmaild/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ def __init__(self, inipath, params):
4545
self.mtail_address = params.get("mtail_address")
4646
self.disable_ipv6 = params.get("disable_ipv6", "false").lower() == "true"
4747
self.acme_email = params.get("acme_email", "")
48+
self.change_kernel_settings = (
49+
params.get("change_kernel_settings", "true").lower() == "true"
50+
)
51+
self.fs_inotify_max_user_instances_and_watchers = int(
52+
params["fs_inotify_max_user_instances_and_watchers"]
53+
)
4854
self.imap_rawlog = params.get("imap_rawlog", "false").lower() == "true"
4955
if "iroh_relay" not in params:
5056
self.iroh_relay = "https://" + params["mail_domain"]

chatmaild/src/chatmaild/ini/chatmail.ini.f

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@
6666
# Your email adress, which will be used in acmetool to manage Let's Encrypt SSL certificates
6767
acme_email =
6868

69+
#
70+
# Kernel settings
71+
#
72+
73+
# if you set "True", the kernel settings will be configured according to the values below
74+
change_kernel_settings = True
75+
76+
# change fs.inotify.max_user_instances and fs.inotify.max_user_watches kernel settings
77+
fs_inotify_max_user_instances_and_watchers = 65535
78+
6979
# Defaults to https://iroh.{{mail_domain}} and running `iroh-relay` on the chatmail
7080
# service.
7181
# If you set it to anything else, the service will be disabled

docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ services:
2020
max-size: "10m"
2121
max-file: "3"
2222
environment:
23+
CHANGE_KERNEL_SETTINGS: "False"
2324
MAIL_DOMAIN: $MAIL_DOMAIN
2425
ACME_EMAIL: $ACME_EMAIL
2526
RECREATE_VENV: $RECREATE_VENV

docker/files/setup_chatmail_docker.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export INI_FILE="${INI_FILE:-chatmail.ini}"
55
export ENABLE_CERTS_MONITORING="${ENABLE_CERTS_MONITORING:-true}"
66
export CERTS_MONITORING_TIMEOUT="${CERTS_MONITORING_TIMEOUT:-60}"
77
export PATH_TO_SSL="${PATH_TO_SSL:-/var/lib/acme/live/${MAIL_DOMAIN}}"
8+
export CHANGE_KERNEL_SETTINGS=${CHANGE_KERNEL_SETTINGS:-"False"}
89
export RECREATE_VENV=${RECREATE_VENV:-"false"}
910

1011
if [ -z "$MAIL_DOMAIN" ]; then

0 commit comments

Comments
 (0)