59 lines
1.7 KiB
Nix
59 lines
1.7 KiB
Nix
{ mailserver, pkgs, config, ... }:
|
|
{
|
|
imports = [
|
|
./nginx
|
|
mailserver.nixosModule
|
|
];
|
|
|
|
mailserver = rec {
|
|
enable = true;
|
|
domains = [
|
|
"${config.secrets.jimDomain}"
|
|
"${config.secrets.jimDomain2}"
|
|
"${config.secrets.lunaDomain}"
|
|
"${config.secrets.cornDomain}"
|
|
];
|
|
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;
|
|
};
|
|
"jimbo@${config.secrets.jimDomain2}" = {
|
|
hashedPasswordFile = pkgs.writeText "jimbo" config.secrets.jimboMailHash;
|
|
aliases = [
|
|
"jimbo@${config.secrets.jimDomain}"
|
|
"james@${config.secrets.jimDomain}"
|
|
"james@${config.secrets.jimDomain2}"
|
|
"contact@${config.secrets.jimDomain}"
|
|
"contact@${config.secrets.jimDomain2}"
|
|
];
|
|
};
|
|
"luna@${config.secrets.lunaDomain}" = {
|
|
hashedPasswordFile = pkgs.writeText "luna" config.secrets.lunaMailHash;
|
|
};
|
|
"corn@${config.secrets.cornDomain}" = {
|
|
hashedPasswordFile = pkgs.writeText "corn" config.secrets.cornMailHash;
|
|
};
|
|
"tiny@${config.secrets.cornDomain}" = {
|
|
hashedPasswordFile = pkgs.writeText "tiny" config.secrets.tinyMailHash;
|
|
};
|
|
};
|
|
};
|
|
|
|
# Assign the correct port
|
|
services.redis.servers.rspamd.port = 1515;
|
|
}
|