2024-05-16 00:07:17 +02:00
|
|
|
{ lib, config, data, ...}:
|
|
|
|
let
|
|
|
|
inherit (data.host) rootDomain;
|
|
|
|
inherit (data.services.mailserver) domain;
|
|
|
|
gitDomain = data.services.git.domain;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
mailserver = {
|
|
|
|
enable = true;
|
|
|
|
fqdn = domain;
|
|
|
|
domains = [
|
|
|
|
rootDomain
|
|
|
|
domain
|
|
|
|
gitDomain
|
|
|
|
];
|
2024-05-16 00:39:15 +02:00
|
|
|
|
|
|
|
# certificateScheme = "acme";
|
|
|
|
# Cannot be used since it uses fqdn
|
|
|
|
certificateScheme = "manual";
|
|
|
|
certificateFile = "${config.security.acme.certs.${rootDomain}.directory}/fullchain.pem";
|
|
|
|
keyFile = "${config.security.acme.certs.${rootDomain}.directory}/key.pem";
|
|
|
|
security.acme.certs."${rootDomain}".reloadServices = [
|
|
|
|
"postfix.service"
|
|
|
|
"dovecot2.service"
|
|
|
|
];
|
|
|
|
|
2024-05-16 00:07:17 +02:00
|
|
|
|
|
|
|
enableManageSieve = true;
|
|
|
|
indexDir = "/var/lib/dovecot/indices";
|
|
|
|
dkimKeyBits = 4096;
|
|
|
|
|
|
|
|
loginAccounts = {
|
|
|
|
"lgm@${rootDomain}" = {
|
|
|
|
aliases = [
|
|
|
|
"lgmrszd@${rootDomain}"
|
|
|
|
"postmaster@${rootDomain}"
|
|
|
|
"abuse@${rootDomain}"
|
|
|
|
];
|
2024-05-16 00:39:15 +02:00
|
|
|
hashedPassword = "$2b$05$E18a4pSMfEmd.mfVGQEJe.JBTS3jxdf6yLDZdOQNIs9NrNMc5K.cK";
|
2024-05-16 00:07:17 +02:00
|
|
|
};
|
|
|
|
"forgejo@${rootDomain}" = {
|
|
|
|
aliases = [
|
|
|
|
"@${gitDomain}"
|
|
|
|
];
|
2024-05-16 00:39:15 +02:00
|
|
|
hashedPassword = "$2b$05$IlDxRGJ6vOUjDIq0hfCd3uIVLQw0oodRU1cG8pKueO1BgaIfpUYPS";
|
2024-05-16 00:07:17 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|