diff options
| author | toufic ar <contact@toufy.me> | 2026-04-22 14:08:19 +0300 |
|---|---|---|
| committer | toufic ar <contact@toufy.me> | 2026-04-22 14:08:19 +0300 |
| commit | c7349e466fef7ecff5a46b1d0c819975a6bdcb8c (patch) | |
| tree | 2a3fc53016ae4d0b31d7583171bd4b8e60f4cc17 /common/mail.nix | |
| download | servers-c7349e466fef7ecff5a46b1d0c819975a6bdcb8c.tar.gz servers-c7349e466fef7ecff5a46b1d0c819975a6bdcb8c.zip | |
initial commit
Diffstat (limited to 'common/mail.nix')
| -rw-r--r-- | common/mail.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/common/mail.nix b/common/mail.nix new file mode 100644 index 0000000..fce389c --- /dev/null +++ b/common/mail.nix @@ -0,0 +1,37 @@ +{config, ...}: let + domainFqdn = config.customOps.domain.fqdn; + domainName = config.customOps.domain.name; + domainTld = config.customOps.domain.tld; +in { + customOps.mailAccounts = { + "domain@${domainFqdn}" = { + passwdFile = "mailserver/domain"; + aliases = [ + "dmarc@${domainFqdn}" + "rua@${domainFqdn}" + "ruf@${domainFqdn}" + "caa@${domainFqdn}" + "tls@${domainFqdn}" + ]; + }; + "root@${domainFqdn}" = { + passwdFile = "mailserver/root"; + aliases = [ + "postmaster@${domainFqdn}" + "security@${domainFqdn}" + "abuse@${domainFqdn}" + "webmaster@${domainFqdn}" + "info@${domainFqdn}" + "support@${domainFqdn}" + ]; + aliasesRegex = [ + "/^admin\\..*@${domainName}\\.${domainTld}$/" + ]; + }; + "contact@${domainFqdn}" = { + passwdFile = "mailserver/contact"; + aliases = ["@${domainFqdn}"]; + catchAll = [domainFqdn]; + }; + }; +} |
