postfix: allow configuring message_size_limit
This commit is contained in:
parent
ebf34930a7
commit
c2ca4d1bb0
|
@ -39,6 +39,13 @@ in
|
||||||
description = "The domains that this mail server serves.";
|
description = "The domains that this mail server serves.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
messageSizeLimit = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
example = 52428800;
|
||||||
|
default = 20971520;
|
||||||
|
description = "Message size limit enforced by Postfix.";
|
||||||
|
};
|
||||||
|
|
||||||
loginAccounts = mkOption {
|
loginAccounts = mkOption {
|
||||||
type = types.loaOf (types.submodule ({ name, ... }: {
|
type = types.loaOf (types.submodule ({ name, ... }: {
|
||||||
options = {
|
options = {
|
||||||
|
|
|
@ -76,7 +76,7 @@ let
|
||||||
# see
|
# see
|
||||||
# https://blog.grimneko.de/2011/12/24/a-bunch-of-tips-for-improving-your-postfix-setup/
|
# https://blog.grimneko.de/2011/12/24/a-bunch-of-tips-for-improving-your-postfix-setup/
|
||||||
# for details on how this file looks. By using the same file as valiases,
|
# for details on how this file looks. By using the same file as valiases,
|
||||||
# every alias is owned (uniquely) by its user.
|
# every alias is owned (uniquely) by its user.
|
||||||
# The user's own address is already in all_valiases_postfix.
|
# The user's own address is already in all_valiases_postfix.
|
||||||
vaccounts_file = builtins.toFile "vaccounts" (lib.concatStringsSep "\n" all_valiases_postfix);
|
vaccounts_file = builtins.toFile "vaccounts" (lib.concatStringsSep "\n" all_valiases_postfix);
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ in
|
||||||
|
|
||||||
smtpd_banner = ${fqdn} ESMTP NO UCE
|
smtpd_banner = ${fqdn} ESMTP NO UCE
|
||||||
disable_vrfy_command = yes
|
disable_vrfy_command = yes
|
||||||
message_size_limit = 20971520
|
message_size_limit = ${builtins.toString cfg.messageSizeLimit}
|
||||||
|
|
||||||
# virtual mail system
|
# virtual mail system
|
||||||
virtual_uid_maps = static:5000
|
virtual_uid_maps = static:5000
|
||||||
|
|
Loading…
Reference in New Issue