mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2025-03-31 07:59:52 +05:00
Merge branch 'lmtpMemoryLimit' into 'master'
Make memory limits configurable for LMTP, quota-status, and IMAP dovecot services See merge request simple-nixos-mailserver/nixos-mailserver!321
This commit is contained in:
commit
232784c81b
24
default.nix
24
default.nix
@ -460,6 +460,22 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
lmtpMemoryLimit = mkOption {
|
||||
type = types.int;
|
||||
default = 256;
|
||||
description = ''
|
||||
The memory limit for the LMTP service, in megabytes.
|
||||
'';
|
||||
};
|
||||
|
||||
quotaStatusMemoryLimit = mkOption {
|
||||
type = types.int;
|
||||
default = 256;
|
||||
description = ''
|
||||
The memory limit for the quota-status service, in megabytes.
|
||||
'';
|
||||
};
|
||||
|
||||
extraVirtualAliases = mkOption {
|
||||
type = let
|
||||
loginAccount = mkOptionType {
|
||||
@ -696,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;
|
||||
|
@ -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}
|
||||
}
|
||||
@ -291,8 +295,13 @@ in
|
||||
mode = 0600
|
||||
user = ${postfixCfg.user}
|
||||
}
|
||||
vsz_limit = ${builtins.toString cfg.lmtpMemoryLimit} MB
|
||||
}
|
||||
|
||||
service quota-status {
|
||||
vsz_limit = ${builtins.toString cfg.quotaStatusMemoryLimit} MB
|
||||
}
|
||||
|
||||
recipient_delimiter = ${cfg.recipientDelimiter}
|
||||
lmtp_save_to_detail_mailbox = ${cfg.lmtpSaveToDetailMailbox}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user