mailserver setup

This commit is contained in:
Ingolf Wagner 2021-02-08 20:48:44 +01:00
parent 6deedffbde
commit be6a8e9cc7
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -1,28 +1,36 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }:
# make sure no update befor changing this parameter
assert lib.versionOlder lib.version "20.09";
let release = "nixos-20.09";
in {
imports = [ imports = [
(builtins.fetchTarball { (builtins.fetchTarball {
url = url =
"https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.2.1/nixos-mailserver-v2.2.1.tar.gz"; "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz";
sha256 = "03d49v8qnid9g9rha0wg2z6vic06mhp0b049s3whccn1axvs2zzx"; # This hash needs to be updated
sha256 = "0000000000000000000000000000000000000000000000000000";
}) })
]; ];
mailserver = { mailserver = {
enable = true; enable = true;
fqdn = "mail.gaykraft.com"; fqdn = "mail.ingolf-wagner.de";
domains = [ "gaykraft.com" ]; domains = [ "ingolf-wagner.de" ];
# A list of all login accounts. To create the password hashes, use # A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -m sha-512 "super secret password"' # nix-shell -p mkpasswd --run 'mkpasswd -m sha-512 "super secret password"'
loginAccounts = { loginAccounts = {
"root@gaykraft.com" = { "root@ingolf-wagner.com" = {
hashedPassword = lib.fileContents hashedPassword = lib.fileContents
<secrets/mailserver/hashedPasswords/root_at_gaykraft.com>; <secrets/mailserver/hashedPasswords/root_at_ingolf-wagner.de>;
#aliases = [ #aliases = [
# "postmaster@gaykraft.com" # "postmaster@gaykraft.com"
#]; #];
# Make this user the catchAll address for domains # Make this user the catchAll address for domains
catchAll = [ "gaykraft.com" ]; catchAll = [ "ingol-wagner.de" ];
}; };
}; };
@ -38,9 +46,9 @@
certificateScheme = 3; certificateScheme = 3;
# Enable IMAP and POP3 # Enable IMAP and POP3
enableImap = true; enableImap = false;
enablePop3 = true; enablePop3 = true;
enableImapSsl = true; enableImapSsl = false;
enablePop3Ssl = true; enablePop3Ssl = true;
# Enable the ManageSieve protocol # Enable the ManageSieve protocol