diff options
author | Nick Van Doorn <nick@nvandoorn.com> | 2023-06-07 21:44:49 +0000 |
---|---|---|
committer | Nick Van Doorn <nick@nvandoorn.com> | 2023-06-07 21:44:49 +0000 |
commit | f8fc3e8e936730ed856c3b783f90e8848c626c55 (patch) | |
tree | d69574e8b87708489edce53e78968e29a6cd705f | |
parent | 076ff767b8d00c0b895d7873b7a6a5dce4c15c13 (diff) |
Configure mail sending
-rw-r--r-- | configuration.nix | 31 |
1 files 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 = { |