2021-02-08 20:48:44 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
# make sure no update befor changing this parameter
|
|
|
|
assert lib.versionOlder lib.version "20.09";
|
|
|
|
|
|
|
|
let release = "nixos-20.09";
|
|
|
|
|
|
|
|
in {
|
2019-11-27 03:21:44 +01:00
|
|
|
imports = [
|
|
|
|
(builtins.fetchTarball {
|
2019-12-20 05:54:26 +01:00
|
|
|
url =
|
2021-02-08 20:48:44 +01:00
|
|
|
"https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz";
|
|
|
|
# This hash needs to be updated
|
|
|
|
sha256 = "0000000000000000000000000000000000000000000000000000";
|
2019-11-27 03:21:44 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
mailserver = {
|
|
|
|
enable = true;
|
2021-02-08 20:48:44 +01:00
|
|
|
fqdn = "mail.ingolf-wagner.de";
|
|
|
|
domains = [ "ingolf-wagner.de" ];
|
2019-11-27 03:21:44 +01:00
|
|
|
|
|
|
|
# A list of all login accounts. To create the password hashes, use
|
|
|
|
# nix-shell -p mkpasswd --run 'mkpasswd -m sha-512 "super secret password"'
|
|
|
|
loginAccounts = {
|
2021-02-08 20:48:44 +01:00
|
|
|
"root@ingolf-wagner.com" = {
|
2019-12-20 05:54:26 +01:00
|
|
|
hashedPassword = lib.fileContents
|
2021-02-08 20:48:44 +01:00
|
|
|
<secrets/mailserver/hashedPasswords/root_at_ingolf-wagner.de>;
|
2019-11-27 03:21:44 +01:00
|
|
|
#aliases = [
|
|
|
|
# "postmaster@gaykraft.com"
|
|
|
|
#];
|
|
|
|
# Make this user the catchAll address for domains
|
2021-02-08 20:48:44 +01:00
|
|
|
catchAll = [ "ingol-wagner.de" ];
|
2019-11-27 03:21:44 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Extra virtual aliases. These are email addresses that are forwarded to
|
|
|
|
# loginAccounts addresses.
|
|
|
|
#extraVirtualAliases = {
|
2019-12-20 05:54:26 +01:00
|
|
|
# address = forward address;
|
|
|
|
#"abuse@example.com" = "user1@example.com";
|
2019-11-27 03:21:44 +01: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
|
2021-02-08 20:48:44 +01:00
|
|
|
enableImap = false;
|
2019-11-27 03:21:44 +01:00
|
|
|
enablePop3 = true;
|
2021-02-08 20:48:44 +01:00
|
|
|
enableImapSsl = false;
|
2019-11-27 03:21:44 +01:00
|
|
|
enablePop3Ssl = true;
|
|
|
|
|
|
|
|
# Enable the ManageSieve protocol
|
2019-11-29 06:01:03 +01:00
|
|
|
enableManageSieve = true;
|
2019-11-27 03:21:44 +01:00
|
|
|
|
|
|
|
# whether to scan inbound emails for viruses (note that this requires at least
|
|
|
|
# 1 Gb RAM for the server. Without virus scanning 256 MB RAM should be plenty)
|
|
|
|
virusScanning = false;
|
|
|
|
};
|
|
|
|
}
|