75 lines
1.8 KiB
Nix
75 lines
1.8 KiB
Nix
# CONFIG IS READY TO USE. IF NO SPECIFIC SETUP IS REQUIRED, THEN, JUST EXIT NANO
|
|
|
|
{ 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;
|
|
fqdn = "";
|
|
domains = [ "" ];
|
|
|
|
# A list of all login accounts. To create the password hashes, use
|
|
# mkpasswd -m sha-512 "super secret password"
|
|
loginAccounts = {
|
|
"@" = {
|
|
hashedPassword = "";
|
|
|
|
#aliases = [
|
|
# "mail@example.com"
|
|
#];
|
|
|
|
# Make this user the catchAll address for domains blah.com and
|
|
# example2.com
|
|
catchAll = [
|
|
""
|
|
];
|
|
sieveScript = ''
|
|
require ["fileinto", "mailbox"];
|
|
if header :contains "Chat-Version" "1.0"
|
|
{
|
|
fileinto :create "DeltaChat";
|
|
stop;
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
|
|
# Extra virtual aliases. These are email addresses that are forwarded to
|
|
# loginAccounts addresses.
|
|
extraVirtualAliases = {
|
|
# address = forward address;
|
|
"" = "";
|
|
};
|
|
|
|
# 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
|
|
enableImap = true;
|
|
enablePop3 = false;
|
|
enableImapSsl = true;
|
|
enablePop3Ssl = false;
|
|
dkimSelector = "selector";
|
|
|
|
# Enable the ManageSieve protocol
|
|
enableManageSieve = false;
|
|
|
|
virusScanning = false;
|
|
};
|
|
security.acme = {
|
|
acceptTerms = true;
|
|
# Replace the email here!
|
|
email = "";
|
|
};
|
|
}
|