From 57a5f832621c92909dc323f09191951505b283e7 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sat, 23 Aug 2025 22:43:45 -0500 Subject: [PATCH] nextcloud: Run an SMTP relay locally For some reason, Nextcloud seems to have trouble sending mail via the network-wide relay. It opens a connection, then just sits there and never sends anything until it times out. This happens probably 4 out of 5 times it attempts to send e-mail messages. Running Postfix locally and directing Nextcloud to send mail through it and then on to the network-wide relay seems to work much more reliably. --- group_vars/nextcloud.yml | 7 ++++++- hosts | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/group_vars/nextcloud.yml b/group_vars/nextcloud.yml index 9bb4fb3..dc9e7cc 100644 --- a/group_vars/nextcloud.yml +++ b/group_vars/nextcloud.yml @@ -10,7 +10,7 @@ nextcloud_trusted_domains: - '{{ ansible_fqdn }}' nextcloud_smtp: from: nextcloud@pyrocufflink.net - host: mail.pyrocufflink.blue + host: 127.0.0.1 port: 25 dnf_automatic_exclude: nextcloud @@ -52,3 +52,8 @@ promtail_scrape_configs: - timestamp: source: timestamp format: '2006-01-02T15:04:05-0700' + +smtp: + mode: relay + host: mail.pyrocufflink.blue + port: 25 diff --git a/hosts b/hosts index 1dcffea..fbdcb9f 100644 --- a/hosts +++ b/hosts @@ -235,6 +235,9 @@ chromie.pyrocufflink.blue [smtp-relay] smtp1.pyrocufflink.blue +[smtp-relay:children] +nextcloud + [squid] [sudo]