From 4a5eb4baea6aa7ed775cf3a842c62b060ab37adb Mon Sep 17 00:00:00 2001 From: Ryan Trinkle Date: Mon, 8 Apr 2024 13:33:50 +0000 Subject: [PATCH] Make LMTP memory limit configurable --- default.nix | 8 ++++++++ mail-server/dovecot.nix | 1 + 2 files changed, 9 insertions(+) diff --git a/default.nix b/default.nix index ac75bce..f8a1305 100644 --- a/default.nix +++ b/default.nix @@ -460,6 +460,14 @@ in ''; }; + lmtpMemoryLimit = mkOption { + type = types.int; + default = 256; + description = '' + The memory limit for the LMTP service, in megabytes. + ''; + }; + extraVirtualAliases = mkOption { type = let loginAccount = mkOptionType { diff --git a/mail-server/dovecot.nix b/mail-server/dovecot.nix index 11f2708..05b5552 100644 --- a/mail-server/dovecot.nix +++ b/mail-server/dovecot.nix @@ -291,6 +291,7 @@ in mode = 0600 user = ${postfixCfg.user} } + vsz_limit = ${builtins.toString cfg.lmtpMemoryLimit} MB } recipient_delimiter = ${cfg.recipientDelimiter}