From 91fdc07d183aeec1b03f246a785ef39ae6fbd1e6 Mon Sep 17 00:00:00 2001 From: David Crompton Date: Sun, 15 Feb 2026 19:42:43 -0500 Subject: [PATCH] hippocampus: dawarich: fix smtp timeout --- machines/hippocampus/servers/public/dawarich.nix | 8 +++++++- .../hippocampus/servers/public/dawarich_smtp_config.rb | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 machines/hippocampus/servers/public/dawarich_smtp_config.rb diff --git a/machines/hippocampus/servers/public/dawarich.nix b/machines/hippocampus/servers/public/dawarich.nix index c98b534..f7f60c5 100644 --- a/machines/hippocampus/servers/public/dawarich.nix +++ b/machines/hippocampus/servers/public/dawarich.nix @@ -5,11 +5,17 @@ }; services.dawarich = { enable = true; + package = pkgs.dawarich.overrideAttrs (old: { + # https://github.com/Freika/dawarich/issues/1469 + postInstall = (old.postInstall or "") + '' + cp ${./dawarich_smtp_config.rb} $out/config/initializers/smtp_settings.rb + ''; + }); webPort = 7392; configureNginx = false; localDomain = "location.crompton.cc"; smtp = { - fromAddress = "cromptonlocation@syzygial.cc"; + fromAddress = "automated@syzygial.cc"; user = "automated@syzygial.cc"; passwordFile = config.sops.secrets.dawarich_smtp.path; host = "smtp.protonmail.ch"; diff --git a/machines/hippocampus/servers/public/dawarich_smtp_config.rb b/machines/hippocampus/servers/public/dawarich_smtp_config.rb new file mode 100644 index 0000000..2ba5090 --- /dev/null +++ b/machines/hippocampus/servers/public/dawarich_smtp_config.rb @@ -0,0 +1,5 @@ +Rails.application.config.action_mailer.smtp_settings.merge!( + authentication: ENV.fetch('SMTP_AUTHENTICATION', 'login').to_sym, + open_timeout: ENV.fetch('SMTP_OPEN_TIMEOUT', '25').to_i, + read_timeout: ENV.fetch('SMTP_READ_TIMEOUT', '25').to_i +)