NixOS-Config/nixos/server/package-configs/mail-server/default.nix

88 lines
2.2 KiB
Nix
Raw Permalink Normal View History

{config, ...}: {
2023-11-27 14:12:18 +01:00
sops.secrets."mailpass".mode = "0440";
sops.secrets."mailpass".owner = config.users.users.virtualMail.name;
#Fix for the dovecot update
services.dovecot2.sieve.extensions = ["fileinto"];
2023-11-24 15:35:17 +01:00
mailserver = {
enable = true;
2023-11-25 01:15:34 +01:00
enableImap = true;
2023-11-25 01:20:13 +01:00
enableSubmission = true;
2023-11-24 15:35:17 +01:00
fqdn = "mail.gladtherescake.eu";
domains = [
"nextcloud.gladtherescake.eu"
"akkoma.gladtherescake.eu"
"social.gladtherescake.eu"
2023-12-15 22:06:04 +01:00
"lillianviolet.dev"
2023-12-30 23:18:48 +01:00
"git.lillianviolet.dev"
];
2023-11-24 15:35:17 +01:00
loginAccounts = {
"no-reply@nextcloud.gladtherescake.eu" = {
hashedPasswordFile = config.sops.secrets."mailpass".path;
};
2023-11-25 14:14:34 +01:00
"no-reply@akkoma.gladtherescake.eu" = {
hashedPasswordFile = config.sops.secrets."mailpass".path;
};
"no-reply@social.gladtherescake.eu" = {
hashedPasswordFile = config.sops.secrets."mailpass".path;
};
2023-12-15 21:20:10 +01:00
"info@lillianviolet.dev" = {
hashedPasswordFile = config.sops.secrets."mailpass".path;
aliases = [
"@lillianviolet.dev"
];
catchAll = [
"lillianviolet.dev"
];
};
2023-12-30 23:18:48 +01:00
"no-reply@git.lillianviolet.dev" = {
hashedPasswordFile = config.sops.secrets."mailpass".path;
};
2023-11-24 15:35:17 +01:00
};
2023-12-15 22:06:04 +01:00
2023-12-17 17:20:19 +01:00
mailboxes = {
2023-12-17 17:22:23 +01:00
All = {
2023-12-17 17:20:19 +01:00
auto = "subscribe";
2023-12-17 17:22:23 +01:00
specialUse = "All";
};
Archive = {
auto = "subscribe";
specialUse = "Archive";
2023-12-17 17:20:19 +01:00
};
Drafts = {
auto = "subscribe";
specialUse = "Drafts";
};
Junk = {
auto = "subscribe";
specialUse = "Junk";
};
Sent = {
auto = "subscribe";
specialUse = "Sent";
};
Trash = {
auto = "no";
specialUse = "Trash";
};
};
2023-12-15 22:06:04 +01:00
rejectRecipients = [
"no-reply@nextcloud.gladtherescake.eu"
"no-reply@akkoma.gladtherescake.eu"
"no-reply@social.gladtherescake.eu"
2023-12-30 23:18:48 +01:00
"no-reply@git.lillianviolet.dev"
2023-12-15 22:06:04 +01:00
];
certificateScheme = "acme-nginx";
2023-12-15 22:11:07 +01:00
certificateDomains = [
"imap.lillianviolet.dev"
"mail.lillianviolet.dev"
"pop3.lillianviolet.dev"
"lillianviolet.dev"
2024-02-03 14:18:35 +01:00
"mail.gladtherescake.eu"
2023-12-15 22:11:07 +01:00
];
2023-11-24 15:35:17 +01:00
};
}