Merge pull request #106 from phdoerfler/mail_max_userip_connections
Added dovecot option for mail_max_userip_connections defaulting to 100
This commit is contained in:
commit
234f92f8a8
2 changed files with 19 additions and 1 deletions
12
default.nix
12
default.nix
|
@ -408,12 +408,22 @@ in
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable verbose logging for mailserver related services. This
|
Whether to enable verbose logging for mailserver related services. This
|
||||||
intended be used for development purposes only, you probably don't want
|
intended be used for development purposes only, you probably don't want
|
||||||
to enable this unless you're hacking on nixos-mailserver.
|
to enable this unless you're hacking on nixos-mailserver.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
maxConnectionsPerUser = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 100;
|
||||||
|
description = ''
|
||||||
|
Maximum number of IMAP/POP3 connections allowed for a user from each IP address.
|
||||||
|
E.g. a value of 50 allows for 50 IMAP and 50 POP3 connections at the same
|
||||||
|
time for a single user.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
localDnsResolver = mkOption {
|
localDnsResolver = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
|
@ -67,6 +67,14 @@ in
|
||||||
verbose_ssl = yes
|
verbose_ssl = yes
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
protocol imap {
|
||||||
|
mail_max_userip_connections = ${toString cfg.maxConnectionsPerUser}
|
||||||
|
}
|
||||||
|
|
||||||
|
protocol pop3 {
|
||||||
|
mail_max_userip_connections = ${toString cfg.maxConnectionsPerUser}
|
||||||
|
}
|
||||||
|
|
||||||
mail_access_groups = ${vmailGroupName}
|
mail_access_groups = ${vmailGroupName}
|
||||||
ssl = required
|
ssl = required
|
||||||
${lib.optionalString (dovecotVersion.major == 2 && dovecotVersion.minor >= 3) ''
|
${lib.optionalString (dovecotVersion.major == 2 && dovecotVersion.minor >= 3) ''
|
||||||
|
|
Loading…
Reference in a new issue