From 25168360265dd584168bd1ae1f1cd550e556d106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 11 May 2024 18:32:05 -0300 Subject: [PATCH] mastodon: configure noreply email --- hosts/phantom/email.nix | 3 +++ hosts/phantom/mastodon.nix | 14 +++++++++++++- secrets/phantom-mastodon-mailer-password.age | 13 +++++++++++++ secrets/secrets.nix | 1 + 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 secrets/phantom-mastodon-mailer-password.age diff --git a/hosts/phantom/email.nix b/hosts/phantom/email.nix index 6c637be..e0a135e 100644 --- a/hosts/phantom/email.nix +++ b/hosts/phantom/email.nix @@ -31,6 +31,9 @@ "noreply@git.lelgenio.com" = { hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0."; }; + "noreply@social.lelgenio.com" = { + hashedPassword = "$2b$05$DcA9xMdvHqqQMZw2.zybI.vfKsQAJtaQ/JB.t9AHu6psstWq97m2C"; + }; }; }; diff --git a/hosts/phantom/mastodon.nix b/hosts/phantom/mastodon.nix index 3deaee5..9d15d6b 100644 --- a/hosts/phantom/mastodon.nix +++ b/hosts/phantom/mastodon.nix @@ -3,9 +3,21 @@ enable = true; configureNginx = true; localDomain = "social.lelgenio.com"; - smtp.fromAddress = "lelgenio@disroot.org"; + smtp = { + authenticate = true; + host = "lelgenio.com"; + fromAddress = "noreply@social.lelgenio.com"; + user = "noreply@social.lelgenio.com"; + passwordFile = config.age.secrets.phantom-mastodon-mailer-password.path; + }; streamingProcesses = 2; extraConfig.SINGLE_USER_MODE = "true"; mediaAutoRemove.olderThanDays = 10; }; + + age.secrets.phantom-mastodon-mailer-password = { + file = ../../secrets/phantom-mastodon-mailer-password.age; + mode = "400"; + owner = "mastodon"; + }; } diff --git a/secrets/phantom-mastodon-mailer-password.age b/secrets/phantom-mastodon-mailer-password.age new file mode 100644 index 0000000..37232fb --- /dev/null +++ b/secrets/phantom-mastodon-mailer-password.age @@ -0,0 +1,13 @@ +age-encryption.org/v1 +-> ssh-rsa BwwxHg +Mnc+/tJ0QqxHkg2nl9gEkz5Oj1RgxtOZnD5gRv66ISUOqZhNm1+F+xVEdKn843/q +/WzH0f1cTF9NXP8vIaEo//bMmp50obJAd+JNovJxV+0gb9L55Nu7ayvK+eyk6j5n +eb8TxUnwh5BPkEyc6akDh/O49GXzLlVoFD6Ik/0f3YCqUDNAYOl2bsssXtevCeK/ +WEPoCFGhZfNUrOo/0eAhiujZZ5zVb0CWNqXi8VTe2eWOE20VJULcN13TEyO3ZePx +bAPBmDfS5GgGlV4INWxVLaIMDrzlm0tYozbBNNUbdLFFOhIOrgvay9RWxdk0u2hJ +MPKoKsJ96EFxrbZJdS0W7a+aZk/Q3A3Civ2rtPx+5UANhmlY8e1lUHa26e1vA4K7 +ApoMtDyCbuZ9FbLurwl9zO64wWP68aKzuyKOIw+wpy41NQ/PcViSY8KNG9Pt7A2N +CcOkByx+rwz+JdNHbOF8O4FFG4fNSWn7SvVtu5ymGgVi1bOd8PdJpjDR+6Is0SX7 + +--- DHNyITb7ZseEV58MOD/zHeH5vff0hhlbKg27rlYECGk +ÆJ…¨Úãè·