NixOS-Config/modules/system/services/mailserver/default.nix

50 lines
1.6 KiB
Nix
Raw Normal View History

2024-10-09 03:36:08 -04:00
{ pkgs, outputs, ... }:
{
imports = [
./nginx
./roundcube
];
2024-08-24 22:16:51 -04:00
mailserver = rec {
enable = true;
2024-09-18 13:49:57 -04:00
openFirewall = false;
domains = [ "${outputs.secrets.jimDomain}" ];
fqdn = "mx.${outputs.secrets.jimDomain}";
2024-08-24 22:16:51 -04:00
certificateScheme = "acme-nginx";
localDnsResolver = false;
redis.port = 1515;
# Dmarc info
dmarcReporting = {
enable = true;
domain = "${outputs.secrets.jimDomain}";
localpart = "noreply";
organizationName = "Jimbo's Files";
};
2024-08-24 22:16:51 -04:00
# A list of accounts, passwords generated with nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
loginAccounts = {
"noreply@${outputs.secrets.jimDomain}" = {
hashedPasswordFile = pkgs.writeText "noreply" outputs.secrets.noreplyMailHash;
2024-08-24 22:16:51 -04:00
sendOnly = true;
};
"jimbo@${outputs.secrets.jimDomain}" = {
hashedPasswordFile = pkgs.writeText "jimbo" outputs.secrets.jimboMailHash;
2024-09-18 13:49:57 -04:00
aliases = [ "james@${outputs.secrets.jimDomain}" "contact@${outputs.secrets.jimDomain}" ];
2024-08-24 22:16:51 -04:00
};
"lunamoonlight@${outputs.secrets.jimDomain}" = {
hashedPasswordFile = pkgs.writeText "luna" outputs.secrets.lunaMailHash;
2024-08-24 22:16:51 -04:00
};
"freecorn1854@${outputs.secrets.jimDomain}" = {
hashedPasswordFile = pkgs.writeText "freecorn" outputs.secrets.freecornMailHash;
2024-08-24 22:16:51 -04:00
};
"tinyattack09@${outputs.secrets.jimDomain}" = {
hashedPasswordFile = pkgs.writeText "tiny" outputs.secrets.tinyMailHash;
2024-08-24 22:16:51 -04:00
};
};
};
# Assign the correct port
services.redis.servers.rspamd.port = 1515;
2024-08-24 22:16:51 -04:00
}