feat: mail server

This commit is contained in:
DACHXY 2025-05-05 13:37:38 +08:00
parent 396a4d603d
commit 1e77f204d0
13 changed files with 320 additions and 57 deletions

View file

@ -1,5 +1,6 @@
{
config,
pkgs,
settings,
...
}:
@ -16,7 +17,10 @@ let
# fqdn = "dn-server.daccc.info";
in
{
networking.firewall.allowedTCPPorts = [ 25 ];
networking.firewall.allowedTCPPorts = [
25
587
];
services.postfix = {
enable = true;
@ -29,9 +33,17 @@ in
fqdn
];
config = {
home_mailbox = "Mailbox";
};
postmasterAlias = "root";
rootAlias = settings.personal.username;
config = {
alias_maps = [ "ldap:${config.sops.secrets."postfix/openldap".path}" ];
};
extraAliases = ''
mailer-daemon: postmaster
nobody: root
@ -44,6 +56,7 @@ in
abuse: root
noc: root
security: root
vaultwarden: root
'';
};
}