2022-12-04 13:45:43 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
2023-09-18 03:56:58 +01:00
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
|
|
|
|
mailConfig = config.services.mailserver;
|
2022-12-04 13:45:43 +00:00
|
|
|
in {
|
2023-09-18 03:56:58 +01:00
|
|
|
config = mkIf mailConfig.enable {
|
2022-12-04 13:45:43 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|