mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2025-04-02 05:44:33 +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 {
|
extraVirtualAliases = mkOption {
|
||||||
type = let
|
type = let
|
||||||
loginAccount = mkOptionType {
|
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 {
|
enableImapSsl = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
@ -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}
|
||||||
}
|
}
|
||||||
@ -291,8 +295,13 @@ in
|
|||||||
mode = 0600
|
mode = 0600
|
||||||
user = ${postfixCfg.user}
|
user = ${postfixCfg.user}
|
||||||
}
|
}
|
||||||
|
vsz_limit = ${builtins.toString cfg.lmtpMemoryLimit} MB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
service quota-status {
|
||||||
|
vsz_limit = ${builtins.toString cfg.quotaStatusMemoryLimit} MB
|
||||||
|
}
|
||||||
|
|
||||||
recipient_delimiter = ${cfg.recipientDelimiter}
|
recipient_delimiter = ${cfg.recipientDelimiter}
|
||||||
lmtp_save_to_detail_mailbox = ${cfg.lmtpSaveToDetailMailbox}
|
lmtp_save_to_detail_mailbox = ${cfg.lmtpSaveToDetailMailbox}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user