This commit is contained in:
commit
30ce0dafc2
195 changed files with 8902 additions and 0 deletions
66
services/mail/service.nix
Normal file
66
services/mail/service.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
sec = config.sops.secrets;
|
||||
inherit (config.machine.mail)
|
||||
enable
|
||||
domain
|
||||
fqdn
|
||||
;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(builtins.fetchTarball {
|
||||
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/master/nixos-mailserver-master.tar.gz";
|
||||
sha256 = "0vnczps1ns4d7b3l5m4qwp2fp567pr6b38w40h1x48qfw70x8mf0";
|
||||
})
|
||||
];
|
||||
|
||||
mailserver = {
|
||||
inherit enable;
|
||||
inherit fqdn;
|
||||
stateVersion = 5;
|
||||
domains = [ domain ];
|
||||
messageSizeLimit = 52428800; # 50MB
|
||||
enableManageSieve = true;
|
||||
|
||||
localDnsResolver = false;
|
||||
|
||||
accounts = {
|
||||
"admin@${domain}" = {
|
||||
hashedPasswordFile = sec."mail/serviceHashedPassword".path;
|
||||
aliases = [
|
||||
"postmaster@${domain}"
|
||||
"system@${domain}"
|
||||
"contact@${domain}"
|
||||
"sales@${domain}"
|
||||
];
|
||||
};
|
||||
"rus07tam@${domain}" = {
|
||||
hashedPasswordFile = sec."rus07tam/hashedPassword".path;
|
||||
aliases = [ ];
|
||||
};
|
||||
"nikitahapanulstaff228@${domain}" = {
|
||||
hashedPasswordFile = sec."mail/NikitaHapanulStaff228HashedPassword".path;
|
||||
aliases = [
|
||||
"mamutraxal@${domain}"
|
||||
"sava.uwu@${domain}"
|
||||
];
|
||||
};
|
||||
"nikitapocox6prohype@${domain}" = {
|
||||
hashedPasswordFile = sec."mail/nikitapocox6prohype".path;
|
||||
aliases = [
|
||||
"pomoemuhype@${domain}"
|
||||
"nikita.uwu@${domain}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
x509.useACMEHost = config.mailserver.fqdn;
|
||||
|
||||
dkim = {
|
||||
enable = true;
|
||||
keyDirectory = "/var/dkim";
|
||||
defaults.selector = "default";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue