[PATCH proxmox-backup v4 22/24] daily-update: Refresh OAuth2 state for SMTP notification endpoints

Arthur Bied-Charreton
2026-04-21T12:03:52Z

Refresh tokens may expire if unused for extended periods of time. Force
refresh them in daily update to prevent this for idle endpoints.

Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
src/bin/proxmox-daily-update.rs | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/src/bin/proxmox-daily-update.rs b/src/bin/proxmox-daily-update.rs
index c4d68e30..d149fdda 100644
--- a/src/bin/proxmox-daily-update.rs
+++ b/src/bin/proxmox-daily-update.rs
@@ -61,6 +61,16 @@ async fn do_update(rpcenv: &mut dyn RpcEnvironment) -> Result<(), Error> {
log::error!("error checking certificates: {err}");
}

+ tokio::task::spawn_blocking(|| match pbs_config::notifications::config() {
+ Ok(conf) => {
+ if let Err(e) = proxmox_notify::api::common::trigger_state_refresh(&conf) {
+ log::error!("Error refreshing notifications endpoints state: {e}");
+ }
+ }
+ Err(e) => log::error!("Error refreshing notifications endpoints state: {e}"),
+ })
+ .await?;
+
// TODO: cleanup tasks like in PVE?

Ok(())
--
2.47.3