Make imap memory limit configurable

This commit is contained in:
Ryan Trinkle 2024-04-08 14:20:46 +00:00
parent 87ffaad9a3
commit dc0569066e
2 changed files with 12 additions and 0 deletions

View file

@ -712,6 +712,14 @@ in
'';
};
imapMemoryLimit = mkOption {
type = types.int;
default = 256;
description = ''
The memory limit for the imap service, in megabytes.
'';
};
enableImapSsl = mkOption {
type = types.bool;
default = true;

View file

@ -276,6 +276,10 @@ in
mail_plugins = $mail_plugins imap_sieve
}
service imap {
vsz_limit = ${builtins.toString cfg.imapMemoryLimit} MB
}
protocol pop3 {
mail_max_userip_connections = ${toString cfg.maxConnectionsPerUser}
}