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-08-27 11:39:04 +03:00
|
|
|
fqdn = "ilchub.net";
|
|
|
|
domains = [ "ilchub.net" ];
|
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-08-27 11:39:04 +03:00
|
|
|
"test@ilchub.net" = {
|
2020-09-01 19:33:37 +03:00
|
|
|
hashedPassword = "";
|
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-08-27 11:39:04 +03:00
|
|
|
"ilchub.net"
|
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-08-27 11:39:04 +03:00
|
|
|
"admin@ilchub.net" = "test@ilchub.net";
|
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-08-27 11:39:04 +03:00
|
|
|
email = "test@ilchub.net";
|
2020-08-24 13:28:59 +03:00
|
|
|
};
|
|
|
|
}
|