nixfiles/hosts/hetzner-arm/containers/mail/modules/mailserver/firewall.nix

29 lines
413 B
Nix
Raw Permalink Normal View History

{
lib,
config,
...
}: let
2023-09-18 03:56:58 +01:00
inherit (lib.modules) mkIf;
mailConfig = config.services.mailserver;
in {
2023-09-18 03:56:58 +01:00
config = mkIf mailConfig.enable {
networking.firewall = {
allowedTCPPorts = [
# SMTP
25
# Submission
587
# Submission w/ SSL
465
# IMAP
143
# IMAP w/ SSL
993
# Sieve
4190
];
};
2022-06-22 15:51:22 +01:00
};
}