From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <l.wagner@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id EE9E69BAD8
 for <pve-devel@lists.proxmox.com>; Tue, 21 Nov 2023 13:13:10 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id D3CB87F43
 for <pve-devel@lists.proxmox.com>; Tue, 21 Nov 2023 13:13:10 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Tue, 21 Nov 2023 13:13:09 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 19E7041036
 for <pve-devel@lists.proxmox.com>; Tue, 21 Nov 2023 13:13:09 +0100 (CET)
Message-ID: <786a840a-6c99-4a6b-946c-c2413afee735@proxmox.com>
Date: Tue, 21 Nov 2023 13:13:08 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: de-AT, en-US
To: Fiona Ebner <f.ebner@proxmox.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <20231121102208.82219-1-l.wagner@proxmox.com>
 <6dd1ceba-07be-43a9-aef3-8ebfc020aec8@proxmox.com>
From: Lukas Wagner <l.wagner@proxmox.com>
In-Reply-To: <6dd1ceba-07be-43a9-aef3-8ebfc020aec8@proxmox.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.009 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: Re: [pve-devel] [PATCH v2 guest-common/manager 0/4] vzdump: add
 'notification-mode' parameter
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Tue, 21 Nov 2023 12:13:11 -0000

On 11/21/23 11:55, Fiona Ebner wrote:
> Am 21.11.23 um 11:22 schrieb Lukas Wagner:
>> This patch series adds the 'notification-mode' setting for backup jobs.
>> It allows users to choose between the 'old-style' notifications
>> (mail to configured address, directly via a call to sendmail) or
>> the 'new-style' notification system.
>>
>> notification-mode has three possible values:
>>    - legacy-sendmail: Use old system, considering mailto/mailtnotification parameters
>>    - notification-system: Use the new system (always sending a notification, irregardless
>>      of success/failure. The user is supposed to configure filtering/matching in
>>      notification settings)
>>    - auto: use old system if mailto is set, or new system if not
>>
>> This should provide a fix/workaround for the users' reports of
>>    - double notifications (these happened in case mailto was set to the same address
>>      as root@pam)
> 
> Can't we detect and avoid this more easily?

There would be other ways to solve this, yes. I could also deduplicate
email-addresses in the backend - which isn't is as trivial as it sounds, 
since the 'legacy' mails are sent via separate, temporary target of
type 'sendmail' - so essentially I'd need to have 'cross-target' context
or something alike.

> 
>>    - notifications always being sent, even if 'mailnotification' is set to failure
> 
> Can't we just treat 'failure' mode as always defaulting to legacy
> sendmail? And properly deprecate the setting, showing a warning/info
> that new notification system is not used if set to 'failure' for both
> CLI and UI. And maybe not even allow setting it for new jobs/manual backups?

I think an explicit switch here is much more obvious and predictable to 
the user.

Personally I think we should wait a bit before deprecating/disallowing 
'mailto' for new backup jobs. This gives us time to polish the UX of
creating matchers etc. without 'forcing' the user into the new system.

-- 
- Lukas