Skip to content

Commit 41efea7

Browse files
Keonik1j4n
authored andcommitted
cmdeploy: Add config parameters change_kernel_settings and fs_inotify_max_user_instances_and_watchers
1 parent ebbc273 commit 41efea7

5 files changed

Lines changed: 23 additions & 0 deletions

File tree

CHANGELOG.md

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

127+
- Add configuration parameters
128+
([#614](https://github.com/chatmail/relay/pull/614)):
129+
- `change_kernel_settings` - Whether to change kernel parameters during installation (default: `True`)
130+
- `fs_inotify_max_user_instances_and_watchers` - Value for kernel parameters `fs.inotify.max_user_instances` and `fs.inotify.max_user_watches` (default: `65535`)
131+
127132
## 1.7.0 2025-09-11
128133

129134
- Make www upload path configurable

chatmaild/src/chatmaild/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ def __init__(self, inipath, params):
4747
self.addr_v4 = os.environ.get("CHATMAIL_ADDR_V4", "")
4848
self.addr_v6 = os.environ.get("CHATMAIL_ADDR_V6", "")
4949
self.acme_email = params.get("acme_email", "")
50+
self.change_kernel_settings = (
51+
params.get("change_kernel_settings", "true").lower() == "true"
52+
)
53+
self.fs_inotify_max_user_instances_and_watchers = int(
54+
params["fs_inotify_max_user_instances_and_watchers"]
55+
)
5056
self.imap_rawlog = params.get("imap_rawlog", "false").lower() == "true"
5157
self.imap_compress = params.get("imap_compress", "false").lower() == "true"
5258
if "iroh_relay" not in params:

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

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

72+
#
73+
# Kernel settings
74+
#
75+
76+
# if you set "True", the kernel settings will be configured according to the values below
77+
change_kernel_settings = True
78+
79+
# change fs.inotify.max_user_instances and fs.inotify.max_user_watches kernel settings
80+
fs_inotify_max_user_instances_and_watchers = 65535
81+
7282
# Defaults to https://iroh.{{mail_domain}} and running `iroh-relay` on the chatmail
7383
# service.
7484
# 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)