[pve-devel] [PATCH widget-toolkit] notify: sendmail: smtp: fix mailto/mailto-user parameter deletion

Maximiliano Sandoval m.sandoval at proxmox.com
Mon Dec 11 16:55:55 CET 2023


Lukas Wagner <l.wagner at proxmox.com> writes:

> Both fields were moved to a separate panel at some point, but this
> broke parameter deletion behavior (e.g. if a target is modified and
> switches from using mailto to mailto-user, then mailto should be
> deleted)
>
> Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>

The commit message was not immediately clear for me.

If one sets X, Y as the values of "Recipient(s)", and "Additional
Recipients(s)" in a Sendmail notification target, and then modifies it
so that either X=`` or Y=``, /etc/pve/notifications.cfg will incorrectly
contain the old values instead of removing the corresponding line:

    sendmail: test
            mailto Y
            mailto-user X

Tested setting both mailto and mailto-user to `` from non-nil values and
switching their values around. The patch fixes this as far as my testing
went.

Tested-by: Maximiliano Sandoval <m.sandoval at proxmox.com>

--
Maximiliano




More information about the pve-devel mailing list