[pve-devel] [PATCH pve-manager 16/27] api: replication: adapt to matcher-based notification system

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Replication.pm | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm index d61518ba..0dc944c9 100644 --- a/PVE/API2/Replication.pm +++ b/PVE/API2/Replication.pm

[pve-devel] [PATCH pve-cluster 08/27] notify: adapt to matcher based notification system

2023-11-07 Thread Lukas Wagner
This commit removes the target paramters from all notify calls. Also, the default 'mail-to-root' target is not added automatically any more - this target will be added by an dpkg hook in the future. Signed-off-by: Lukas Wagner --- src/PVE/Notif

[pve-devel] [PATCH many 00/27] overhaul notification system, use matchers instead of filters

2023-11-07 Thread Lukas Wagner
kup jobs as deprecated in UI - while also migrating automatically to the new system (create an endpoint/matcher when creating/updating a backup job) proxmox: Lukas Wagner (6): notify: introduce Error::Generic notify: factor out notification content into its own type notify: rep

[pve-devel] [PATCH proxmox 04/27] notify: add calendar matcher

2023-11-07 Thread Lukas Wagner
This allows matching by a notification's timestamp: matcher: foo match-calendar mon..fri 8-12 Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/matcher.rs | 6 +++ proxmox-notify/src/lib.rs | 4 ++ proxmox-notify/src/matcher.rs | 65 +++ 3

[pve-devel] [PATCH proxmox-perl-rs 07/27] notify: adapt to new matcher-based notification routing

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 167 +-- 1 file changed, 50 insertions(+), 117 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs index 9f44225..4fbd705 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs

[pve-devel] [PATCH proxmox-widget-toolkit 22/27] notification ui: remove filter setting for targets

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile| 1 - src/form/NotificationFilterSelector.js | 58 - src/panel/GotifyEditPanel.js| 9 src/panel/NotificationGroupEditPanel.js | 9 src/panel/SendmailEditPanel.js

[pve-devel] [PATCH pve-manager 11/27] api: notification: remove notification groups

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 267 +- 1 file changed, 4 insertions(+), 263 deletions(-) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index ec666903..b34802c8 100644 --- a/PVE/API2/Cluster

[pve-devel] [PATCH proxmox-widget-toolkit 23/27] notification ui: remove notification groups

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile| 1 - src/Schema.js | 5 - src/panel/NotificationConfigView.js | 4 - src/panel/NotificationGroupEditPanel.js | 174 4 files changed, 184 deletions(-) delete

[pve-devel] [PATCH proxmox-widget-toolkit 26/27] notification ui: unprotected mailto-root target

2023-11-07 Thread Lukas Wagner
A default notification config will now be created in pve-manager's postinst hook - which is not magic in any way and can be modified and deleted as desired. Signed-off-by: Lukas Wagner --- src/panel/NotificationConfigView.js | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/

[pve-devel] [PATCH proxmox-widget-toolkit 21/27] notification ui: add target selector for matcher

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/window/NotificationFilterEdit.js | 145 +++ 1 file changed, 145 insertions(+) diff --git a/src/window/NotificationFilterEdit.js b/src/window/NotificationFilterEdit.js index 703a9e2..bcde4fa 100644 --- a/src/window

[pve-devel] [PATCH proxmox 01/27] notify: introduce Error::Generic

2023-11-07 Thread Lukas Wagner
... as leaf error-type for anything for which we do not necessarily want a separate enum variant. Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 11 +++ 1 file changed, 11 insertions(+) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 7500778

[pve-devel] [PATCH pve-guest-common 09/27] vzdump: deprecate mailto/mailnotification/notification-{target, policy}

2023-11-07 Thread Lukas Wagner
The first two will be migrated to the notification system, the second were part for the first attempt for the new notification system. The first attempt only ever hit pvetest, so we simply tell the user to not use the two params. Signed-off-by: Lukas Wagner --- src/PVE/VZDump/Common.pm | 16

[pve-devel] [PATCH proxmox 02/27] notify: factor out notification content into its own type

2023-11-07 Thread Lukas Wagner
field for metadata, which will be useful for notification filtering. This decouples template rendering and filtering, which enables us to be very precise about which metadata fields we allow to be used in filters. Signed-off-by: Lukas Wagner --- proxmox-notify/examples/render.rs| 4 +- prox

[pve-devel] [PATCH pve-ha-manager 10/27] env: switch to matcher-based notification system

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/PVE/HA/Env/PVE2.pm | 10 ++ src/PVE/HA/NodeStatus.pm | 11 +-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE/HA/Env/PVE2.pm index ea9e6e4..fcb60a9 100644 --- a/src/PVE/HA/Env/PVE2.pm +++ b

[pve-devel] [PATCH proxmox 05/27] notify: matcher: introduce common trait for match directives

2023-11-07 Thread Lukas Wagner
This allows us to make the match-checking code a bit shorter. Signed-off-by: Lukas Wagner --- proxmox-notify/src/matcher.rs | 92 +-- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/proxmox-notify/src/matcher.rs b/proxmox-notify/src/matcher.rs

[pve-devel] [PATCH proxmox 06/27] notify: let a matcher always match if it has no matching directives

2023-11-07 Thread Lukas Wagner
This should be a bit more intuitive to users than the current behavior, which is 'always match' for mode==all and 'never match' for mode==any. The current behavior originates in the neutral element of the underlying logical operation (and, or). Signed-off-by: Lukas Wagner ---

Re: [pve-devel] [PATCH v2 many 00/11] notifications: feed system mails into proxmox_notify

2023-10-19 Thread Lukas Wagner
On 10/17/23 09:28, Lukas Wagner wrote: Ping - would be great to get some reviews on this to get this merged for the next release. On 10/2/23 10:06, Lukas Wagner wrote: The aim of this patch series is to adapt `proxmox-mail-forward` so that it forwards emails that were sent to the local root

Re: [pve-devel] [PATCH v3 many 0/7] notifications: add SMTP endpoint

2023-10-19 Thread Lukas Wagner
On 10/17/23 09:27, Lukas Wagner wrote: Ping - would be great to get some reviews on this to get this merged for the next release. On 9/18/23 13:14, Lukas Wagner wrote: This patch series adds support for a new notification endpoint type, smtp. As the name suggests, this new endpoint allows

Re: [pve-devel] [RFC] towards automated integration testing

2023-10-18 Thread Lukas Wagner
On 10/17/23 18:28, Thomas Lamprecht wrote: Am 17/10/2023 um 14:33 schrieb Lukas Wagner: On 10/17/23 08:35, Thomas Lamprecht wrote:  From top of my head I'd rather do some attribute based dependency annotation, so that one can depend on single tests, or whole fixture on others single

Re: [pve-devel] [RFC] towards automated integration testing

2023-10-17 Thread Lukas Wagner
On 10/17/23 08:35, Thomas Lamprecht wrote: Is the order of test-cases guaranteed by toml parsing, or how are intra- fixture dependencies ensured? Good point. With rollbacks in between test cases it probably does not matter much, but on 'real hardware' with no rollback this could definitely

Re: [pve-devel] [PATCH v2 many 00/11] notifications: feed system mails into proxmox_notify

2023-10-17 Thread Lukas Wagner
Ping - would be great to get some reviews on this to get this merged for the next release. On 10/2/23 10:06, Lukas Wagner wrote: The aim of this patch series is to adapt `proxmox-mail-forward` so that it forwards emails that were sent to the local root user through the `proxmox_notify` crate

Re: [pve-devel] [PATCH v3 many 0/7] notifications: add SMTP endpoint

2023-10-17 Thread Lukas Wagner
Ping - would be great to get some reviews on this to get this merged for the next release. On 9/18/23 13:14, Lukas Wagner 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

Re: [pve-devel] [RFC] towards automated integration testing

2023-10-16 Thread Lukas Wagner
Thanks for the summary from our discussion and the additional feedback! On 10/16/23 15:57, Thomas Lamprecht wrote: - create some sort of test report As Stefan mentioned, test-output can be good to have. Our buildbot instance provides that, and while I don't look at them in 99% of the builds

Re: [pve-devel] [RFC] towards automated integration testing

2023-10-16 Thread Lukas Wagner
Thank you for the feedback! On 10/16/23 13:20, Stefan Hanreich wrote: On 10/13/23 15:33, Lukas Wagner wrote: - Additionally, it should be easy to run these integration tests locally on a developer's workstation in order to write new test cases, as well as troubleshooting and debu

[pve-devel] [RFC] towards automated integration testing

2023-10-13 Thread Lukas Wagner
Hello, I am currently doing the groundwork that should eventually enable us to write automated integration tests for our products. Part of that endeavor will be to write a custom test runner, which will - setup a specified test environment - execute test cases in that environment - create

Re: [pve-devel] [PATCH manager] ui: acl add: show warning if root@pam is selected

2023-10-10 Thread Lukas Wagner
On 10/10/23 14:10, Fiona Ebner wrote: Am 26.07.23 um 15:41 schrieb Lukas Wagner: Currently, users are able to add ACL entries for the root@pam user. Since this user always has full permissions, no entry in the ACL tree will be saved, and consequently no new entry shows up in the UI after

Re: [pve-devel] [PATCH v3 proxmox-i18n] update German translation

2023-10-10 Thread Lukas Wagner
Hi again, On 10/10/23 09:42, Hannes Duerr wrote: update German translation Signed-off-by: Hannes Duerr --- Hab die Änderungen aufgenommen not a blocker for this patch (so no need to send another version, as this won't be visible in the commit message), but usually you'd write something like

[pve-devel] [PATCH proxmox-widget-toolkit] schema: endpoint types: don't translate endpoint type names

2023-10-09 Thread Lukas Wagner
... that are not really translatable. Signed-off-by: Lukas Wagner --- src/Schema.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Schema.js b/src/Schema.js index a7ffdf8..e0f583a 100644 --- a/src/Schema.js +++ b/src/Schema.js @@ -39,12 +39,12 @@ Ext.define

Re: [pve-devel] [PATCH v2 proxmox-i18n] update German translation

2023-10-09 Thread Lukas Wagner
Some comments inline. On 10/9/23 15:21, Hannes Duerr wrote: Signed-off-by: Hannes Duerr --- de.po | 111 -- 1 file changed, 37 insertions(+), 74 deletions(-) diff --git a/de.po b/de.po index fea74f1..4f6de7d 100644 --- a/de.po +++ b/de

[pve-devel] [PATCH proxmox-widget-toolkit] panel: sendmail edit: don't translate 'Proxmox VE' in author field

2023-10-09 Thread Lukas Wagner
The default value is determined by the backend and is never translated (which does not make sense any way for a product name). This was likely just a copy/paste mistake from other from fields. Signed-off-by: Lukas Wagner --- src/panel/SendmailEditPanel.js | 2 +- 1 file changed, 1 insertion

Re: [pve-devel] [PATCH proxmox-i18n 1/1] update German translation

2023-10-09 Thread Lukas Wagner
Hello Hannes, please configure your git client so that the commit author is your full name [1]: git config --global user.name "Firstname Lastname" Also, this patch is missing the 'Signed-off-by' line. That line is auto-generated by git if you provide the right flags to `git commit` or `gi

Re: [pve-devel] [PATCH proxmox-widget-toolkit v1 1/2] fix #4546: css: Inform user administrator about user accounts expiring soon

2023-10-06 Thread Lukas Wagner
Comments inline. On 9/22/23 16:36, Philipp Hufnagl wrote: Adds a new css class to underlay information urgency in table columns for dark and light mode. This underlay color then is used to notifiy Typo in 'notify' user administrators about user accounts that will expire soon Signed-off-by: Ph

Re: [pve-devel] [PATCH proxmox-widget-toolkit v1 2/2] fix #4546: utils: save expiring date of user account for UI

2023-10-06 Thread Lukas Wagner
Comments inline. On 9/22/23 16:36, Philipp Hufnagl wrote: When an user experation date is send with the /accesss/tickets POST API ^ ^ ^ some minor typos: expiration sent access call, it will be stored in a global variable

Re: [pve-devel] [PATCH manager/access-control/proxmox-widget-toolkit v1 0/4] fix #4546: Show warning hint/badge if user account is expiring in next few days

2023-10-06 Thread Lukas Wagner
On 9/22/23 16:36, Philipp Hufnagl wrote: Currently, when an user account expires, it catches the users by surprise. It would be helpful to notify the the user as well as the administrator. This patch highlights such accounts in the user account pannel and also shows for regular user an exclam

Re: [pve-devel] [PATCH manager v1 1/1] fix #4546: ui: notify user if their user account expires soon

2023-10-06 Thread Lukas Wagner
Comments inline. On 9/22/23 16:36, Philipp Hufnagl wrote: When the user account that is currently logged in will expire soon, the user icon will turn into a yellow exclamation mark. In the user menu there will be a new element informing the user briefly about it. If the

Re: [pve-devel] [PATCH access-control v1 1/1] fix #4546: api: Return user expiration date on access/ticket API call

2023-10-06 Thread Lukas Wagner
Comments inline. On 9/22/23 16:36, Philipp Hufnagl wrote: Adds an additional, optional parameter to the access/tickets api call which tells when the currently used user account will expire. If it will not expire, the parameter will not be added. Signed-off-by: Philipp Hufnagl --- src/PVE/API

[pve-devel] [PATCH v2 proxmox-mail-forward 10/11] feed forwarded mails into proxmox_notify

2023-10-02 Thread Lukas Wagner
hould automatically work in the same way as for PVE. Signed-off-by: Lukas Wagner --- Cargo.toml | 8 +- src/main.rs | 348 +++- 2 files changed, 238 insertions(+), 118 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c68e802..64f8d47 100644

[pve-devel] [PATCH v2 proxmox 05/11] notify: add PVE/PBS context

2023-10-02 Thread Lukas Wagner
now require it for `proxmox-mail-forward`. This commit also changes the global context from being stored in a `once_cell` to a regular `Mutex`, since we now need to set/reset the context in `proxmox-mail-forward`. Signed-off-by: Lukas Wagner --- proxmox-notify/Cargo.toml

[pve-devel] [PATCH v2 proxmox-perl-rs 07/11] pve-rs: notify: remove notify_context for PVE

2023-10-02 Thread Lukas Wagner
The context has now been moved to `proxmox-notify` due to the fact that we also need it in `proxmox-mail-forward` now. Signed-off-by: Lukas Wagner --- pve-rs/Cargo.toml| 2 +- pve-rs/src/lib.rs| 7 ++- pve-rs/src/notify_context.rs | 117

[pve-devel] [PATCH v2 proxmox-perl-rs 06/11] notify: construct Notification via constructor

2023-10-02 Thread Lukas Wagner
This keeps us isolated from any further changes in the proxmox_notify::Notification struct. Signed-off-by: Lukas Wagner --- common/src/notify.rs | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs index 9f44225..203acca 100644

[pve-devel] [PATCH v2 debcargo-conf 01/11] package mail-parser 0.8.2

2023-10-02 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/mail-parser/debian/changelog | 6 ++ src/mail-parser/debian/copyright | 49 .../debian/copyright.debcargo.hint| 77 +++ src/mail-parser/debian/debcargo.toml | 2 + 4 files changed

[pve-devel] [PATCH v2 proxmox 04/11] notify: add mechanisms for email message forwarding

2023-10-02 Thread Lukas Wagner
attempt to transform the HTML into readable plain text. Signed-off-by: Lukas Wagner --- Cargo.toml | 1 + proxmox-notify/Cargo.toml| 2 + proxmox-notify/src/endpoints/gotify.rs | 21 +++-- proxmox-notify/src/endpoints/sendmail.rs | 62

[pve-devel] [PATCH v2 pve-cluster 08/11] datacenter config: add new parameters for system mail forwarding

2023-10-02 Thread Lukas Wagner
This commit adds two new paramters to the 'notify' property string: - 'system-mail': Determine whether mails to root should be forwarded by the notification system - 'system-mail-target': Determine the target to which the notification should be forwa

[pve-devel] [PATCH v2 pve-manager 09/11] ui: notify: add system-mail settings, configuring mail forwarding

2023-10-02 Thread Lukas Wagner
The 'Notifications' panel in Datacenter view now features a new entry 'System mail', allowing the user to configure target and policy for mails sent to the local root user. Signed-off-by: Lukas Wagner --- www/manager6/dc/NotificationEvents.js | 27 +++

[pve-devel] [PATCH v2 many 00/11] notifications: feed system mails into proxmox_notify

2023-10-02 Thread Lukas Wagner
vide a pre-built deb for `mail-parser`. Changelog: - v1 -> v2: - Rebased - Apply the same fix for the PVE context as in [1] [1] https://lists.proxmox.com/pipermail/pve-devel/2023-October/059294.html debcargo-conf: Lukas Wagner (1): package mail-parser 0.8.2 src/mail-parser/d

[pve-devel] [PATCH v2 pve-docs 11/11] notification: add docs for system mail forwarding

2023-10-02 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 28 +--- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index c4d2931..0b00b1e 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -19,9 +19,10 @@ such as

[pve-devel] [PATCH v2 proxmox 02/11] sys: email: add `forward`

2023-10-02 Thread Lukas Wagner
This new function forwards an email to new recipients. Signed-off-by: Lukas Wagner --- proxmox-sys/src/email.rs | 52 +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/proxmox-sys/src/email.rs b/proxmox-sys/src/email.rs index 8b3a1b6..c94f634

[pve-devel] [PATCH v2 proxmox 03/11] notify: introduce Error::Generic

2023-10-02 Thread Lukas Wagner
... as leaf error-type for anything for which we do not necessarily want a separate enum variant. Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 11 +++ 1 file changed, 11 insertions(+) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 7500778

[pve-devel] [PATCH proxmox-perl-rs] notify context: fix 'default_sendmail_from' context method

2023-10-02 Thread Lukas Wagner
The name of the configuration option in datacenter.cfg is `email_from` and not `mail_from`. Signed-off-by: Lukas Wagner --- Reported in our forum: https://forum.proxmox.com/threads/mail-alerts-not-sent-with-datacenter-default.134305/ pve-rs/src/notify_context.rs | 2 +- 1 file changed, 1

[pve-devel] [PATCH v2 proxmox 5/7] cache: add new crate 'proxmox-shared-cache'

2023-09-28 Thread Lukas Wagner
the cache very frequently (due to the overhead of JSON de/serialization) - Require arbitrary keys - right now, keys are limited by SAFE_ID_REGEX The cache was developed for the use in pvestatd, in order to cache e.g. storage plugin status. There, these limitations do not really play any role. Sign

[pve-devel] [PATCH v2 proxmox-perl-rs 6/7] cache: add bindings for `SharedCache`

2023-09-28 Thread Lukas Wagner
These bindings are contained in the `SharedCacheBase` class, which is subclassed by `SharedCache` in Perl. The subclass was needed to implement the `get_or_update` method since that requires to call a closure as a passed parameter. Signed-off-by: Lukas Wagner --- Notes: Changes v1 ->

[pve-devel] [PATCH v2 pve-storage 7/7] stats: api: cache storage plugin status

2023-09-28 Thread Lukas Wagner
: Lukas Wagner --- Notes: Changes v1 -> v2: - Add `ignore-cache` paramter - use `get_or_update` method from Proxmox::RS::SharedCached - invalidated the cache in other cases (e.g. when allocating volumes, as this might change the amount of free space) src/PVE/API2/Stor

[pve-devel] [PATCH v2 proxmox 3/7] sys: fs: use inline formatting for bail! macro

2023-09-28 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-sys/src/fs/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-sys/src/fs/mod.rs b/proxmox-sys/src/fs/mod.rs index 8d790a4..f54aaf6 100644 --- a/proxmox-sys/src/fs/mod.rs +++ b/proxmox-sys/src/fs/mod.rs @@ -71,12 +71,12

[pve-devel] [PATCH v2 proxmox 4/7] sys: add make_tmp_dir

2023-09-28 Thread Lukas Wagner
Under the hood, this function calls `mkdtemp` from libc. Unfortunatly the nix crate did not provide bindings for this function, so we have to call into libc directly. Signed-off-by: Lukas Wagner --- Notes: Changes from v1 -> v2: - Use remove_dir instead of unlink - Log error

[pve-devel] [PATCH v2 storage/proxmox{, -perl-rs} 0/7] cache storage plugin status for pvestatd/API status update calls

2023-09-28 Thread Lukas Wagner
t/058806.html proxmox: Lukas Wagner (5): sys: fs: remove unnecessary clippy allow directive sys: fs: let CreateOptions::apply_to take RawFd instead of File sys: fs: use inline formatting for bail! macro sys: add make_tmp_dir cache: add new crate 'proxmox-shared-cache&

[pve-devel] [PATCH v2 proxmox 2/7] sys: fs: let CreateOptions::apply_to take RawFd instead of File

2023-09-28 Thread Lukas Wagner
Suggested-by: Wolfgang Bumiller Signed-off-by: Lukas Wagner --- proxmox-shared-memory/src/lib.rs | 4 ++-- proxmox-sys/src/fs/file.rs | 4 ++-- proxmox-sys/src/fs/mod.rs| 9 - 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/proxmox-shared-memory/src/lib.rs b

[pve-devel] [PATCH v2 proxmox 1/7] sys: fs: remove unnecessary clippy allow directive

2023-09-28 Thread Lukas Wagner
It seems like the mentioned clippy bug has since been fixed. Signed-off-by: Lukas Wagner --- proxmox-sys/src/fs/dir.rs | 4 proxmox-sys/src/fs/mod.rs | 2 -- 2 files changed, 6 deletions(-) diff --git a/proxmox-sys/src/fs/dir.rs b/proxmox-sys/src/fs/dir.rs index 6aee316..0b409d7 100644

Re: [pve-devel] [PATCH v3 many 0/7] notifications: add SMTP endpoint

2023-09-25 Thread Lukas Wagner
The notification system overhaul is available in the pvetest repository, however that does not yet include the SMTP endpoint type. Only gotify and sendmail (uses the system's sendmail command to send mails) are available so far. -- - Lukas ___ pve-

[pve-devel] [PATCH v3 proxmox 3/7] notify: add api for smtp endpoints

2023-09-18 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs | 48 + proxmox-notify/src/api/smtp.rs | 373 + 2 files changed, 421 insertions(+) create mode 100644 proxmox-notify/src/api/smtp.rs diff --git a/proxmox-notify/src/api/mod.rs b/proxmox-notify

[pve-devel] [PATCH v3 proxmox-perl-rs 4/7] notify: add bindings for smtp API calls

2023-09-18 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 110 +++ 1 file changed, 110 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index 203acca..b0a7d44 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs @@ -13,6 +13,10

[pve-devel] [PATCH v3 proxmox 1/7] notify: fix typo in doc comments

2023-09-18 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index eebc57a..ca68388 100644 --- a/proxmox-notify/src/lib.rs +++ b/proxmox-notify/src/lib.rs @@ -106,7 +106,7

[pve-devel] [PATCH v3 proxmox 2/7] notify: add 'smtp' endpoint

2023-09-18 Thread Lukas Wagner
or that is shared between sendmail and smtp endpoints has been moved to a new `endpoints::common::mail` module. Signed-off-by: Lukas Wagner --- Cargo.toml | 1 + proxmox-notify/Cargo.toml | 4 +- proxmox-notify/src/config.rs

[pve-devel] [PATCH v3 proxmox-widget-toolkit 6/7] panel: notification: add gui for SMTP endpoints

2023-09-18 Thread Lukas Wagner
. Signed-off-by: Lukas Wagner --- src/Makefile | 2 + src/Schema.js| 5 + src/panel/EmailRecipientPanel.js | 89 ++ src/panel/SendmailEditPanel.js | 67 ++- src/panel/SmtpEditPanel.js | 192 +++ 5

[pve-devel] [PATCH v3 pve-manager 5/7] notify: add API routes for smtp endpoints

2023-09-18 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 337 ++ 1 file changed, 337 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index ec666903..0f9d6432 100644 --- a/PVE/API2/Cluster/Notifications.pm

[pve-devel] [PATCH v3 pve-docs 7/7] notifications: document SMTP endpoints

2023-09-18 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 28 1 file changed, 28 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index 0b00b1e..c2fe393 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -73,9 +73,37 @@ accomodate multiple

[pve-devel] [PATCH v3 many 0/7] notifications: add SMTP endpoint

2023-09-18 Thread Lukas Wagner
oid having to rewrite mail headers (otherwise, some SMTP relays might reject the mail, because the `From` header of the forwarded mail does not match the mail account) [1] https://lists.proxmox.com/pipermail/pve-devel/2023-August/058956.html proxmox: Lukas Wagner (3): notify: fix ty

[pve-devel] [PATCH proxmox-widget-toolkit] notification config view: add missing parameter for Ext.String.format

2023-09-18 Thread Lukas Wagner
Fixes: 7e4b51 ("notification config view: fix using gettext with parameter") Signed-off-by: Lukas Wagner --- src/panel/NotificationConfigView.js | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/panel/NotificationConfigView.js b/src/panel/NotificationCon

[pve-devel] [PATCH manager] ui: notification: remove unneeded gettext calls

2023-09-18 Thread Lukas Wagner
'mail-to-root' is the name of the default notification target and should thus not be translated. Signed-off-by: Lukas Wagner --- www/manager6/dc/NotificationEvents.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/manager6/dc/NotificationEvents.js b/www/m

Re: [pve-devel] [PATCH common/cluster 0/3] fix #4937: fix utf8 encoding issues while saving notification config

2023-09-01 Thread Lukas Wagner
On 8/30/23 14:37, Lukas Wagner wrote: These patches should fix issues with certain special characters (e.g ü) in the notification configuration [1]. Before, when setting a comment for an endpoint to certain values (e.g. 'für admins'), the resulting saved configuration would contain in

Re: [pve-devel] [PATCH manager] ui: replication: backup: use renderEnabledIcon to render the enabled column

2023-09-01 Thread Lukas Wagner
Ping On 7/18/23 11:53, Lukas Wagner wrote: Signed-off-by: Lukas Wagner --- www/manager6/dc/Backup.js| 3 +-- www/manager6/grid/Replication.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js index 03a02651

Re: [pve-devel] [PATCH manager 1/3] ui: ldap: ad: support 'mode' paramter, replacing 'secure'

2023-09-01 Thread Lukas Wagner
Ping. Still applies on master. On 7/27/23 10:57, Lukas Wagner wrote: The backend has supported the 'mode' parameter for quite a while, however it has not yet been exposed in the GUI, contrary to PMG and PBS. The benefit of 'mode' is that it supports LDAP, LDAPS and LDAP vi

[pve-devel] [PATCH v2 proxmox 2/8] notify: add api for smtp endpoints

2023-08-31 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs | 48 + proxmox-notify/src/api/smtp.rs | 373 + 2 files changed, 421 insertions(+) create mode 100644 proxmox-notify/src/api/smtp.rs diff --git a/proxmox-notify/src/api/mod.rs b/proxmox-notify

[pve-devel] [PATCH v2 proxmox-widget-toolkit 7/8] panel: notification: fix `gettext` calls

2023-08-31 Thread Lukas Wagner
gettext is rather simple and does not like multi-line strings or string interpolation. Reported-by: Maximiliano Sandoval Signed-off-by: Lukas Wagner --- src/panel/NotificationConfigView.js | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/panel

[pve-devel] [PATCH v2 pve-docs 8/8] notifications: document SMTP endpoints

2023-08-31 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 28 1 file changed, 28 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index 0b00b1e..c2fe393 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -73,9 +73,37 @@ accomodate multiple

[pve-devel] [PATCH v2 proxmox-perl-rs 4/8] notify: add bindings for smtp API calls

2023-08-31 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 110 +++ 1 file changed, 110 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index 203acca..b0a7d44 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs @@ -13,6 +13,10

[pve-devel] [PATCH v2 proxmox 3/8] notify: fix typo in doc comments

2023-08-31 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 646cffc..609337f 100644 --- a/proxmox-notify/src/lib.rs +++ b/proxmox-notify/src/lib.rs @@ -106,7 +106,7

[pve-devel] [PATCH v2 proxmox 1/8] notify: add 'smtp' endpoint

2023-08-31 Thread Lukas Wagner
or that is shared between sendmail and smtp endpoints has been moved to a new `endpoints::common::mail` module. Signed-off-by: Lukas Wagner --- Cargo.toml | 1 + proxmox-notify/Cargo.toml | 4 +- proxmox-notify/src/config.rs

[pve-devel] [PATCH v2 pve-manager 5/8] notify: add API routes for smtp endpoints

2023-08-31 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 337 ++ 1 file changed, 337 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index ec666903..0f9d6432 100644 --- a/PVE/API2/Cluster/Notifications.pm

[pve-devel] [PATCH v2 proxmox-widget-toolkit 6/8] panel: notification: add gui for SMTP endpoints

2023-08-31 Thread Lukas Wagner
. Signed-off-by: Lukas Wagner --- src/Makefile | 2 + src/Schema.js| 5 + src/panel/EmailRecipientPanel.js | 89 ++ src/panel/SendmailEditPanel.js | 69 ++- src/panel/SmtpEditPanel.js | 192 +++ 5

[pve-devel] [PATCH v2 many 0/8] notifications: add SMTP endpoint

2023-08-31 Thread Lukas Wagner
ail does not match the mail account) [1] https://lists.proxmox.com/pipermail/pve-devel/2023-August/058956.html proxmox: Lukas Wagner (3): notify: add 'smtp' endpoint notify: add api for smtp endpoints notify: fix typo in doc comments Cargo.toml

Re: [pve-devel] [PATCH widget-toolkit v2] notify ui: fix `gettext` calls

2023-08-31 Thread Lukas Wagner
On 8/28/23 15:07, Lukas Wagner wrote: gettext is rather dumb and does not like multi-line strings or string interpolation. Reported-by: Maximiliano Sandoval Signed-off-by: Lukas Wagner --- diff --git a/src/panel/NotificationConfigView.js b/src/panel/NotificationConfigView.js index

[pve-devel] [PATCH proxmox 05/11] notify: add PVE/PBS context

2023-08-31 Thread Lukas Wagner
now require it for `proxmox-mail-forward`. This commit also changes the global context from being stored in a `once_cell` to a regular `Mutex`, since we now need to set/reset the context in `proxmox-mail-forward`. Signed-off-by: Lukas Wagner --- proxmox-notify/Cargo.toml

[pve-devel] [PATCH proxmox-perl-rs 07/11] pve-rs: notify: remove notify_context for PVE

2023-08-31 Thread Lukas Wagner
The context has now been moved to `proxmox-notify` due to the fact that we also need it in `proxmox-mail-forward` now. Signed-off-by: Lukas Wagner --- pve-rs/Cargo.toml| 2 +- pve-rs/src/lib.rs| 7 ++- pve-rs/src/notify_context.rs | 117

[pve-devel] [PATCH pve-docs 11/11] notification: add docs for system mail forwarding

2023-08-31 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 28 +--- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index c4d2931..0b00b1e 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -19,9 +19,10 @@ such as

[pve-devel] [PATCH debcargo-conf 01/11] package mail-parser 0.8.2

2023-08-31 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/mail-parser/debian/changelog | 6 ++ src/mail-parser/debian/copyright | 49 .../debian/copyright.debcargo.hint| 77 +++ src/mail-parser/debian/debcargo.toml | 2 + 4 files changed

[pve-devel] [PATCH many 00/11] notifications: feed system mails into proxmox_notify

2023-08-31 Thread Lukas Wagner
vide a pre-built deb for `mail-parser`. debcargo-conf: Lukas Wagner (1): package mail-parser 0.8.2 src/mail-parser/debian/changelog | 6 ++ src/mail-parser/debian/copyright | 49 .../debian/copyright.debcargo.hint| 77 +

[pve-devel] [PATCH proxmox-mail-forward 10/11] feed forwarded mails into proxmox_notify

2023-08-31 Thread Lukas Wagner
hould automatically work in the same way as for PVE. Signed-off-by: Lukas Wagner --- Cargo.toml | 8 +- src/main.rs | 348 +++- 2 files changed, 238 insertions(+), 118 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c68e802..64f8d47 100644

[pve-devel] [PATCH pve-manager 09/11] ui: notify: add system-mail settings, configuring mail forwarding

2023-08-31 Thread Lukas Wagner
The 'Notifications' panel in Datacenter view now features a new entry 'System mail', allowing the user to configure target and policy for mails sent to the local root user. Signed-off-by: Lukas Wagner --- www/manager6/dc/NotificationEvents.js | 27 +++

[pve-devel] [PATCH pve-cluster 08/11] datacenter config: add new parameters for system mail forwarding

2023-08-31 Thread Lukas Wagner
This commit adds two new paramters to the 'notify' property string: - 'system-mail': Determine whether mails to root should be forwarded by the notification system - 'system-mail-target': Determine the target to which the notification should be forwa

[pve-devel] [PATCH proxmox 04/11] notify: add mechanisms for email message forwarding

2023-08-31 Thread Lukas Wagner
attempt to transform the HTML into readable plain text. Signed-off-by: Lukas Wagner --- Cargo.toml | 1 + proxmox-notify/Cargo.toml| 2 + proxmox-notify/src/endpoints/gotify.rs | 21 +++-- proxmox-notify/src/endpoints/sendmail.rs | 62

[pve-devel] [PATCH proxmox 02/11] sys: email: add `forward`

2023-08-31 Thread Lukas Wagner
This new function forwards an email to new recipients. Signed-off-by: Lukas Wagner --- proxmox-sys/src/email.rs | 52 +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/proxmox-sys/src/email.rs b/proxmox-sys/src/email.rs index da910d4..cf7091a

[pve-devel] [PATCH proxmox-perl-rs 06/11] notify: construct Notification via constructor

2023-08-31 Thread Lukas Wagner
This keeps us isolated from any further changes in the proxmox_notify::Notification struct. Signed-off-by: Lukas Wagner --- common/src/notify.rs | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs index 9f44225..203acca 100644

[pve-devel] [PATCH proxmox 03/11] notify: introduce Error::Generic

2023-08-31 Thread Lukas Wagner
... as leaf error-type for anything for which we do not necessarily want a separate enum variant. Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 11 +++ 1 file changed, 11 insertions(+) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 7500778

[pve-devel] [PATCH pve-cluster 2/3] cluster fs: allow to specify file encoding for cfs_write_file

2023-08-30 Thread Lukas Wagner
Since this function is used to store utf8-encoded strings that come from Rust, we need to be able to save the file in proper utf8 encoding as well. Signed-off-by: Lukas Wagner --- src/PVE/Cluster.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/Cluster.pm b/src

[pve-devel] [PATCH pve-common 1/3] tools: allow to specify file encoding for file_set_contents

2023-08-30 Thread Lukas Wagner
Rationale: This is used from cfs_write_file, which is now also used to write utf8-encoded strings that come from Rust. If no encoding is specified while writing the file, we run into problems with certain special characters (e.g. 'ü') Signed-off-by: Lukas Wagner --- src/PVE/To

[pve-devel] [PATCH pve-cluster 3/3] fix #4937: notify: write configuration files in utf8 encoding

2023-08-30 Thread Lukas Wagner
Strings that are returned from the Rust implementation are encoded as utf8. To avoid issues with certain special characters (e.g. german umlauts), we also need to explicitly store the configuration files in utf8 encoding. Signed-off-by: Lukas Wagner --- src/PVE/Notify.pm | 4 ++-- 1 file

[pve-devel] [PATCH common/cluster 0/3] fix #4937: fix utf8 encoding issues while saving notification config

2023-08-30 Thread Lukas Wagner
at was the configuration was returned from Rust as a proper utf8 string, however it was saved to the file system without specifying an encoding. [1] https://bugzilla.proxmox.com/show_bug.cgi?id=4937 pve-common: Lukas Wagner (1): tools: allow to specify file encoding for file_set_contents

[pve-devel] [PATCH widget-toolkit v2] notify ui: fix `gettext` calls

2023-08-28 Thread Lukas Wagner
gettext is rather dumb and does not like multi-line strings or string interpolation. Reported-by: Maximiliano Sandoval Signed-off-by: Lukas Wagner --- Changelog v1 -> v2: - now with 100% more `gettext` (TM)! src/panel/NotificationConfigView.js | 4 ++-- src/panel/SendmailEditPanel

Re: [pve-devel] [PATCH widget-toolkit] notify ui: fix `gettext` calls

2023-08-28 Thread Lukas Wagner
On 8/28/23 14:59, Lukas Wagner wrote: - message: gettext(`Sent test notification to '${target}'.`), + message: Ext.String.format("Sent test notification to '{0}'.", target), Of course I forgot the

[pve-devel] [PATCH widget-toolkit] notify ui: fix `gettext` calls

2023-08-28 Thread Lukas Wagner
gettext is rather dumb and does not like multi-line strings or string interpolation. Reported-by: Maximiliano Sandoval Signed-off-by: Lukas Wagner --- src/panel/NotificationConfigView.js | 4 ++-- src/panel/SendmailEditPanel.js | 4 +--- 2 files changed, 3 insertions(+), 5 deletions

<    1   2   3   4   5   6   7   8   9   10   >