2024-10-22 20:43:32 -04:00
|
|
|
{ mailserver, pkgs, config, ... }:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./nginx
|
|
|
|
mailserver.nixosModule
|
|
|
|
];
|
|
|
|
|
|
|
|
mailserver = rec {
|
|
|
|
enable = true;
|
2024-10-24 23:04:34 -04:00
|
|
|
domains = [
|
|
|
|
"${config.secrets.jimDomain}"
|
|
|
|
"${config.secrets.jimDomain2}"
|
|
|
|
"${config.secrets.lunaDomain}"
|
|
|
|
"${config.secrets.cornDomain}"
|
|
|
|
];
|
2024-10-22 20:43:32 -04:00
|
|
|
fqdn = "mx.${config.secrets.jimDomain}";
|
|
|
|
certificateScheme = "acme-nginx";
|
|
|
|
localDnsResolver = false;
|
|
|
|
redis.port = 1515;
|
|
|
|
|
|
|
|
dmarcReporting = {
|
|
|
|
enable = true;
|
|
|
|
domain = "${config.secrets.jimDomain}";
|
|
|
|
localpart = "noreply";
|
|
|
|
organizationName = "Jimbo's Files";
|
|
|
|
};
|
|
|
|
|
|
|
|
# A list of accounts, passwords generated with nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
|
|
|
|
loginAccounts = {
|
|
|
|
"noreply@${config.secrets.jimDomain}" = {
|
|
|
|
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
|
|
|
|
sendOnly = true;
|
|
|
|
};
|
2024-10-24 23:04:34 -04:00
|
|
|
"jimbo@${config.secrets.jimDomain2}" = {
|
2024-10-22 20:43:32 -04:00
|
|
|
hashedPasswordFile = pkgs.writeText "jimbo" config.secrets.jimboMailHash;
|
2024-10-24 23:04:34 -04:00
|
|
|
aliases = [
|
|
|
|
"jimbo@${config.secrets.jimDomain}"
|
|
|
|
"james@${config.secrets.jimDomain}"
|
|
|
|
"james@${config.secrets.jimDomain2}"
|
|
|
|
"contact@${config.secrets.jimDomain}"
|
|
|
|
"contact@${config.secrets.jimDomain2}"
|
|
|
|
];
|
2024-10-22 20:43:32 -04:00
|
|
|
};
|
2024-10-22 22:37:44 -04:00
|
|
|
"luna@${config.secrets.lunaDomain}" = {
|
2024-10-22 20:43:32 -04:00
|
|
|
hashedPasswordFile = pkgs.writeText "luna" config.secrets.lunaMailHash;
|
|
|
|
};
|
2024-10-22 22:37:44 -04:00
|
|
|
"corn@${config.secrets.cornDomain}" = {
|
2024-10-22 22:45:42 -04:00
|
|
|
hashedPasswordFile = pkgs.writeText "corn" config.secrets.cornMailHash;
|
2024-10-22 20:43:32 -04:00
|
|
|
};
|
2024-10-22 22:37:44 -04:00
|
|
|
"tiny@${config.secrets.cornDomain}" = {
|
2024-10-22 20:43:32 -04:00
|
|
|
hashedPasswordFile = pkgs.writeText "tiny" config.secrets.tinyMailHash;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Assign the correct port
|
|
|
|
services.redis.servers.rspamd.port = 1515;
|
|
|
|
}
|