summaryrefslogtreecommitdiff
path: root/host/software/server
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-10-13 21:06:46 +0200
committerAdrian Kummerlaender2018-10-13 21:06:46 +0200
commitba4b3829ddca1532135d871d8329e06df7e6c365 (patch)
tree966e149caec7b6e3b74069631837c08e0c0fcfbf /host/software/server
parenta9e707c85dcfaaee28657346426cab6a87516ced (diff)
downloadnixos_system-ba4b3829ddca1532135d871d8329e06df7e6c365.tar
nixos_system-ba4b3829ddca1532135d871d8329e06df7e6c365.tar.gz
nixos_system-ba4b3829ddca1532135d871d8329e06df7e6c365.tar.bz2
nixos_system-ba4b3829ddca1532135d871d8329e06df7e6c365.tar.lz
nixos_system-ba4b3829ddca1532135d871d8329e06df7e6c365.tar.xz
nixos_system-ba4b3829ddca1532135d871d8329e06df7e6c365.tar.zst
nixos_system-ba4b3829ddca1532135d871d8329e06df7e6c365.zip
Include automatix's mail server config
Diffstat (limited to 'host/software/server')
-rw-r--r--host/software/server/mail.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/host/software/server/mail.nix b/host/software/server/mail.nix
new file mode 100644
index 0000000..ac65ef4
--- /dev/null
+++ b/host/software/server/mail.nix
@@ -0,0 +1,34 @@
+{ config, pkgs, ... }:
+
+{
+ imports = [
+ (builtins.fetchTarball "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/v2.1.4/nixos-mailserver-v2.1.4.tar.gz")
+ ];
+
+ mailserver = {
+ enable = true;
+ fqdn = "mx.kummerlaender.eu";
+ domains = [ "kummerlaender.eu" ];
+
+ loginAccounts = import ./mailusers.nix;
+
+ # Enable LetsEncrypt
+ certificateScheme = 3;
+
+ enableImap = true;
+ enableImapSsl = true;
+ };
+
+ systemd.services.fetchmail = {
+ enable = true;
+ after = [ "dovecot2.service" ];
+ wantedBy = [ "dovecot2.service" ];
+ serviceConfig = {
+ User = "virtualMail";
+ ExecStart = ''
+ ${pkgs.fetchmail}/bin/fetchmail --fetchmailrc /var/vmail/fetchmailrc \
+ --mda "${pkgs.dovecot}/libexec/dovecot/deliver -d adrian@kummerlaender.eu"
+ '';
+ };
+ };
+}