selfprivacy_fork/static/mailserver.nix

75 lines
1.8 KiB
Nix
Raw Normal View History

2020-09-14 09:56:28 +03:00
# CONFIG IS READY TO USE. IF NO SPECIFIC SETUP IS REQUIRED, THEN, JUST EXIT NANO
2020-08-24 13:28:59 +03:00
{ config, pkgs, ... }:
{
imports = [
(builtins.fetchTarball {
# Pick a commit from the branch you are interested in
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/4008d0cb/nixos-mailserver-4008d0cb.tar.gz";
# And set its hash
sha256 = "1y9svi3nrg24ky1gqbpa3zhnhhin399h0cmnf81hb4yn75mlqiqx";
})
];
mailserver = {
enable = true;
2020-09-14 09:56:28 +03:00
fqdn = "";
domains = [ "" ];
2020-08-24 13:28:59 +03:00
# A list of all login accounts. To create the password hashes, use
# mkpasswd -m sha-512 "super secret password"
loginAccounts = {
2020-09-14 09:56:28 +03:00
"@" = {
2020-09-01 19:33:37 +03:00
hashedPassword = "";
2020-09-04 16:48:52 +03:00
2020-08-24 13:28:59 +03:00
#aliases = [
# "mail@example.com"
#];
# Make this user the catchAll address for domains blah.com and
# example2.com
catchAll = [
2020-09-14 09:56:28 +03:00
""
2020-08-24 13:28:59 +03:00
];
2020-09-04 16:48:52 +03:00
sieveScript = ''
require ["fileinto", "mailbox"];
if header :contains "Chat-Version" "1.0"
{
fileinto :create "DeltaChat";
stop;
}
'';
2020-08-24 13:28:59 +03:00
};
};
# Extra virtual aliases. These are email addresses that are forwarded to
# loginAccounts addresses.
extraVirtualAliases = {
# address = forward address;
2020-09-14 09:56:28 +03:00
"" = "";
2020-08-24 13:28:59 +03:00
};
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
# down nginx and opens port 80.
certificateScheme = 3;
# Enable IMAP and POP3
2020-09-01 19:33:37 +03:00
enableImap = true;
2020-08-24 13:28:59 +03:00
enablePop3 = false;
enableImapSsl = true;
enablePop3Ssl = false;
dkimSelector = "selector";
# Enable the ManageSieve protocol
enableManageSieve = false;
virusScanning = false;
};
security.acme = {
acceptTerms = true;
# Replace the email here!
2020-09-14 09:56:28 +03:00
email = "";
2020-08-24 13:28:59 +03:00
};
}