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 { enableImapSsl = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;

View File

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