2024-10-22 20:43:32 -04:00
|
|
|
{ mailserver, pkgs, config, ... }:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./nginx
|
|
|
|
mailserver.nixosModule
|
|
|
|
];
|
|
|
|
|
|
|
|
mailserver = rec {
|
2024-12-12 06:37:05 -05:00
|
|
|
enable = true;
|
2024-10-24 23:04:34 -04:00
|
|
|
domains = [
|
2024-10-24 23:42:09 -04:00
|
|
|
"${config.domains.jim1}"
|
|
|
|
"${config.domains.jim2}"
|
|
|
|
"${config.domains.luna}"
|
|
|
|
"${config.domains.corn}"
|
2024-10-24 23:04:34 -04:00
|
|
|
];
|
2024-10-24 23:42:09 -04:00
|
|
|
fqdn = "mx.${config.domains.jim1}";
|
2024-10-22 20:43:32 -04:00
|
|
|
certificateScheme = "acme-nginx";
|
|
|
|
localDnsResolver = false;
|
|
|
|
redis.port = 1515;
|
|
|
|
|
|
|
|
dmarcReporting = {
|
|
|
|
enable = true;
|
2024-10-24 23:42:09 -04:00
|
|
|
domain = "${config.domains.jim1}";
|
2024-10-22 20:43:32 -04:00
|
|
|
localpart = "noreply";
|
|
|
|
organizationName = "Jimbo's Files";
|
|
|
|
};
|
|
|
|
|
2024-11-13 03:43:51 -05:00
|
|
|
# Passwords generated with 'mkpasswd -sm bcrypt'
|
2024-10-22 20:43:32 -04:00
|
|
|
loginAccounts = {
|
2024-10-24 23:42:09 -04:00
|
|
|
"noreply@${config.domains.jim1}" = {
|
2024-10-22 20:43:32 -04:00
|
|
|
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
|
|
|
|
sendOnly = true;
|
|
|
|
};
|
2024-10-24 23:49:01 -04:00
|
|
|
"jimbo@${config.domains.jim2}" = {
|
2024-10-22 20:43:32 -04:00
|
|
|
hashedPasswordFile = pkgs.writeText "jimbo" config.secrets.jimboMailHash;
|
2024-10-24 23:04:34 -04:00
|
|
|
aliases = [
|
2024-11-13 03:43:51 -05:00
|
|
|
"jimbo@${config.domains.jim1}"
|
|
|
|
"james@${config.domains.jim1}"
|
|
|
|
"james@${config.domains.jim2}"
|
|
|
|
"contact@${config.domains.jim1}"
|
|
|
|
"contact@${config.domains.jim2}"
|
2024-10-24 23:04:34 -04:00
|
|
|
];
|
2024-10-22 20:43:32 -04:00
|
|
|
};
|
2024-10-24 23:42:09 -04:00
|
|
|
"luna@${config.domains.luna}" = {
|
2024-10-22 20:43:32 -04:00
|
|
|
hashedPasswordFile = pkgs.writeText "luna" config.secrets.lunaMailHash;
|
|
|
|
};
|
2024-10-24 23:42:09 -04:00
|
|
|
"corn@${config.domains.corn}" = {
|
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-24 23:42:09 -04:00
|
|
|
"tiny@${config.domains.corn}" = {
|
2024-10-22 20:43:32 -04:00
|
|
|
hashedPasswordFile = pkgs.writeText "tiny" config.secrets.tinyMailHash;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-11-13 03:43:51 -05:00
|
|
|
# Rspamd port from earlier to avoid overlap
|
2024-10-22 20:43:32 -04:00
|
|
|
services.redis.servers.rspamd.port = 1515;
|
|
|
|
}
|