From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Lukas Wagner <l.wagner@proxmox.com>,
Dietmar Maurer <dietmar@proxmox.com>,
Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH v4 many 00/11] notifications: add SMTP endpoint
Date: Thu, 9 Nov 2023 14:10:58 +0100 [thread overview]
Message-ID: <01fa99c3-3233-4c53-a2fc-74d27e628c40@proxmox.com> (raw)
In-Reply-To: <b63e7939-23d7-46f8-a9e5-c6d53a0f1789@proxmox.com>
Am 09/11/2023 um 13:34 schrieb Lukas Wagner:
> On 11/9/23 13:16, Dietmar Maurer wrote:
>>> On 11/8/23 16:52, Dietmar Maurer wrote:
>>>>> This patch series adds support for a new notification endpoint type,
>>>>> smtp. As the name suggests, this new endpoint allows PVE to talk
>>>>> to SMTP server directly, without using the system's MTA (postfix).
>>>>
>>>> Isn't this totally unreliable? What if the server responds with a
>>>> temporary error code? (An MTA retries several times).
>>>
>>> The notification system has no mechanism yet for queuing/retries,
>>> so yes, at the moment a SMTP endpoint would indeed be less reliable than
>>> a 'sendmail' endpoint. I'm not sure though if I would call it
>>> 'totally unreliable'.
>>
>> This kind of notification system is quite popular for (PHP) web-sites contact
>> form. I have seen many over-simplified implementation overs the years,
>> and yes, it is totally unreliable.
>>
>> That is why we always used an MTA to deliver mails...
>
> I see. What would be your suggestion? To not have such a plugin at all?
> I implemented this because it was explicitly mentioned by Thomas in the
> tracking bugzilla issue for an overhauled notification system [1].
> Not having to configure Postfix if one wants to use an external
> SMTP relay seems to be add quite a lot of value to the user (e.g.
> judging from [2] and [3])
While Dietmar is definitively has a point, and making this more robust
in the long run would be good, I see the (re-)queuing and the availability
of the endpoints as a bit different things.
And as you say, like currently the request to gotify needs to get through,
the one to the SMTP serve does too.
Also, user-facing SMTP servers are most of the time not doing any grey
listing or rate limiting or the like, as the authentication itself is
enough proof that a legitimate user wants to send a mail anyway, so once
the MTA of the users' mail provider accepted it, they'll handle retries
with the target MTAs.
In the end one might indeed want to move the actual sending out to a daemon
(it's own, or if we really want to avoid an extra daemon then one of the
existing, frequently running, ones like pvescheduler or pvestatd) and the
library calls just generating a queue-entry file in, e.g., the
/var/spool/pve-notification directory.
But adding that would not require any breaking change w.r.t. configs or
the like, so while definitively good to have in the long run, it would not
need to be necessarily done now.
> As a compromise, maybe we could just add a note to the docs
> that discusses the reliability aspects of 'sendmail' vs 'smtp'
> endpoints?
>
Sure, for now adding a general hint to the documentation that they are
send one-shot only would be good.
next prev parent reply other threads:[~2023-11-09 13:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 15:39 Lukas Wagner
2023-11-08 15:39 ` [pve-devel] [PATCH v4 debcargo-conf 01/11] cherry-pick chumsky 0.9.2 from debian unstable Lukas Wagner
2023-11-08 15:39 ` [pve-devel] [PATCH v4 debcargo-conf 02/11] update lettre to 0.11.1 Lukas Wagner
2023-11-08 15:39 ` [pve-devel] [PATCH v4 proxmox 03/11] sys: email: add `forward` Lukas Wagner
2023-11-08 15:39 ` [pve-devel] [PATCH v4 proxmox 04/11] notify: add mechanisms for email message forwarding Lukas Wagner
2023-11-08 15:39 ` [pve-devel] [PATCH v4 proxmox 05/11] notify: add 'smtp' endpoint Lukas Wagner
2023-11-08 15:40 ` [pve-devel] [PATCH v4 proxmox 06/11] notify: add api for smtp endpoints Lukas Wagner
2023-11-08 15:40 ` [pve-devel] [PATCH v4 proxmox-perl-rs 07/11] notify: add bindings for smtp API calls Lukas Wagner
2023-11-08 15:40 ` [pve-devel] [PATCH v4 pve-manager 08/11] notify: add API routes for smtp endpoints Lukas Wagner
2023-11-08 15:40 ` [pve-devel] [PATCH v4 proxmox-widget-toolkit 09/11] panel: notification: add gui for SMTP endpoints Lukas Wagner
2023-11-08 15:40 ` [pve-devel] [PATCH v4 pve-docs 10/11] notifications: document " Lukas Wagner
2023-11-08 15:40 ` [pve-devel] [PATCH v4 pve-docs 11/11] notifications: document 'comment' option for targets/matchers Lukas Wagner
2023-11-08 15:52 ` [pve-devel] [PATCH v4 many 00/11] notifications: add SMTP endpoint Dietmar Maurer
2023-11-09 10:23 ` Lukas Wagner
2023-11-09 12:16 ` Dietmar Maurer
2023-11-09 12:34 ` Lukas Wagner
2023-11-09 13:10 ` Thomas Lamprecht [this message]
2023-11-09 15:35 ` Dietmar Maurer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01fa99c3-3233-4c53-a2fc-74d27e628c40@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=dietmar@proxmox.com \
--cc=l.wagner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox