27 lines
379 B
Nix
27 lines
379 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
mail_config = config.mailserver;
|
|
in {
|
|
config = lib.mkIf mail_config.enable {
|
|
networking.firewall = {
|
|
allowedTCPPorts = [
|
|
# SMTP
|
|
25
|
|
# Submission
|
|
587
|
|
# Submission w/ SSL
|
|
465
|
|
# IMAP
|
|
143
|
|
# IMAP w/ SSL
|
|
993
|
|
# Sieve
|
|
4190
|
|
];
|
|
};
|
|
};
|
|
}
|