From f8fc3e8e936730ed856c3b783f90e8848c626c55 Mon Sep 17 00:00:00 2001 From: Nick Van Doorn Date: Wed, 7 Jun 2023 21:44:49 +0000 Subject: Configure mail sending --- configuration.nix | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/configuration.nix b/configuration.nix index c61efcb..8b5db09 100644 --- a/configuration.nix +++ b/configuration.nix @@ -204,22 +204,43 @@ "create mask" = "0644"; "directory mask" = "0755"; }; - oldhome = { - path = "/mnt/cluster1/home"; + downloads = { + path = "/mnt/pool/media/downloads"; browseable = "yes"; - "valid users" = "nick"; + "valid users" = ["nick"]; "read only" = "no"; "guest ok" = "no"; "create mask" = "0644"; "directory mask" = "0755"; }; + }; }; services.tailscale.enable = true; - services.postfix = { + programs.msmtp = { enable = true; - rootAlias = "vandoorn.nick@gmail.com"; + setSendmail = true; + defaults = { + aliases = "/etc/aliases"; + port = 465; + tls_trust_file = "/etc/ssl/certs/ca-certificates.crt"; + tls = "on"; + auth = "login"; + tls_starttls = "off"; + }; + accounts = { + default = { + auth = true; + tls = true; + # try setting `tls_starttls` to `false` if sendmail hangs + tls_starttls = false; + from = "homeserver@nvandoorn.com"; + host = "smtp.fastmail.com"; + user = "nick@nv.delivery"; + passwordeval = "cat /home/nick/secrets/smtp_password.txt"; + }; + }; }; services.smartd = { -- cgit v1.2.3