mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-11-11 19:39:16 +05:00
Merge pull request #28 from eqyiel/open-imaps-port
mail-server/networking.nix: open port 993
This commit is contained in:
commit
97b524cab9
25
default.nix
25
default.nix
@ -184,7 +184,7 @@ in
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable imap / pop3. Both variants are only supported in the
|
||||
(sane) startTLS configuration. (TODO: Allow SSL ports). The ports are
|
||||
(sane) startTLS configuration. The ports are
|
||||
|
||||
110 - Pop3
|
||||
143 - IMAP
|
||||
@ -192,12 +192,21 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
enableImapSsl = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable IMAPS, setting this option to true will open port 993
|
||||
in the firewall.
|
||||
'';
|
||||
};
|
||||
|
||||
enablePop3 = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable POP3. Both variants are only supported in the
|
||||
(sane) startTLS configuration. (TODO: Allow SSL ports). The ports are
|
||||
Whether to enable POP3. Both variants are only supported in the (sane)
|
||||
startTLS configuration. The ports are
|
||||
|
||||
110 - Pop3
|
||||
143 - IMAP
|
||||
@ -205,8 +214,14 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
# imapSsl = mkOption {} #< TODO
|
||||
# pop3Ssl = mkOption {} #< TODO
|
||||
enablePop3Ssl = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable POP3S, setting this option to true will open port 995
|
||||
in the firewall.
|
||||
'';
|
||||
};
|
||||
|
||||
virusScanning = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -24,8 +24,10 @@ in
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 25 587 ]
|
||||
++ (if enableImap then [ 143 ] else [])
|
||||
++ (if enablePop3 then [ 110 ] else []);
|
||||
++ lib.optional enableImap 143
|
||||
++ lib.optional enableImapSsl 993
|
||||
++ lib.optional enablePop3 110
|
||||
++ lib.optional enablePop3Ssl 995;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user