From 1a39bd538d1c08444c3a077ce8bfa48061dfdca1 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 2 Apr 2026 20:44:08 +0000 Subject: [PATCH] add opt-in SMTP click tracking disable for email links (#8665) * feat: add opt-in SMTP click tracking disable for email links Co-Authored-By: Claude Opus 4.6 (1M context) * chore: update ee-repo-ref.txt for email clicktracking branch Co-Authored-By: Claude Opus 4.6 (1M context) * chore: update ee-repo-ref.txt after simplification Co-Authored-By: Claude Opus 4.6 (1M context) * fix: exclude trailing commas from URL regex in clicktracking Co-Authored-By: Claude Opus 4.6 (1M context) * chore: update ee-repo-ref to 57dd88faa3b0b354f813385cf3f6a34eca54a4a1 This commit updates the EE repository reference after PR #504 was merged in windmill-ee-private. Previous ee-repo-ref: 5cf901db7fb0ea169b09564372e444f28e23ac3a New ee-repo-ref: 57dd88faa3b0b354f813385cf3f6a34eca54a4a1 Automated by sync-ee-ref workflow. * chore: update ee-repo-ref.txt to include dedicated worker fixes Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Claude Opus 4.6 (1M context) Co-authored-by: windmill-internal-app[bot] --- backend/Cargo.lock | 42 +++++++++++++++++++ backend/ee-repo-ref.txt | 2 +- backend/windmill-common/src/server.rs | 7 ++++ .../instanceSettings/SmtpSettings.svelte | 8 ++++ 4 files changed, 58 insertions(+), 1 deletion(-) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 7943dee150..93b18d6daf 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -12118,6 +12118,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ece8e78b2f38ec51c51f5d475df0a7187ba5111b2a28bdc761ee05b075d40a71" +[[package]] +name = "scc" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46e6f046b7fef48e2660c57ed794263155d713de679057f2d0c169bfc6e756cc" +dependencies = [ + "sdd", +] + [[package]] name = "schannel" version = "0.1.29" @@ -12223,6 +12232,12 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "sdd" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490dcfcbfef26be6800d11870ff2df8774fa6e86d047e3e8c8a76b25655e41ca" + [[package]] name = "seahash" version = "4.1.0" @@ -12559,6 +12574,32 @@ dependencies = [ "serde", ] +[[package]] +name = "serial_test" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911bd979bf1070a3f3aa7b691a3b3e9968f339ceeec89e08c280a8a22207a32f" +dependencies = [ + "futures-executor", + "futures-util", + "log", + "once_cell", + "parking_lot", + "scc", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a7d91949b85b0d2fb687445e448b40d322b6b3e4af6b44a29b21d9a5f33e6d9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "sha1" version = "0.10.6" @@ -15971,6 +16012,7 @@ dependencies = [ "serde_derive", "serde_json", "serde_yml", + "serial_test", "sha1", "sha2 0.10.9", "sql-builder", diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index b572bde77b..cc0babab7c 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -9d9e0284b336c0ee4493143391b931d47872bf3e +91cd9ca431ec5b80b038573b5a5efa9773dafaa1 diff --git a/backend/windmill-common/src/server.rs b/backend/windmill-common/src/server.rs index b0c768a86f..bd948a4f96 100644 --- a/backend/windmill-common/src/server.rs +++ b/backend/windmill-common/src/server.rs @@ -11,6 +11,7 @@ pub struct Smtp { pub from: String, pub tls_implicit: Option, pub disable_tls: Option, + pub clicktracking_off: Option, } #[derive(Serialize, Deserialize, PartialEq)] @@ -22,6 +23,7 @@ pub struct SmtpConfigOpt { pub smtp_from: Option, pub smtp_tls_implicit: Option, pub smtp_disable_tls: Option, + pub smtp_clicktracking_off: Option, } pub async fn load_smtp_config(db: &DB) -> error::Result> { @@ -46,6 +48,7 @@ pub async fn load_smtp_config(db: &DB) -> error::Result> { from: config .smtp_from .unwrap_or_else(|| "noreply@getwindmill.com".to_string()), + clicktracking_off: config.smtp_clicktracking_off, }) } else { None @@ -72,6 +75,9 @@ pub async fn load_smtp_config(db: &DB) -> error::Result> { .unwrap_or(587), from: std::env::var("SMTP_FROM") .unwrap_or_else(|_| "noreply@getwindmill.com".to_string()), + clicktracking_off: std::env::var("SMTP_CLICKTRACKING_OFF") + .ok() + .and_then(|p| p.parse().ok()), }) } else { None @@ -94,6 +100,7 @@ impl Default for SmtpConfigOpt { smtp_tls_implicit: None, smtp_username: None, smtp_disable_tls: None, + smtp_clicktracking_off: None, } } } diff --git a/frontend/src/lib/components/instanceSettings/SmtpSettings.svelte b/frontend/src/lib/components/instanceSettings/SmtpSettings.svelte index a25cb77691..c297b1a32f 100644 --- a/frontend/src/lib/components/instanceSettings/SmtpSettings.svelte +++ b/frontend/src/lib/components/instanceSettings/SmtpSettings.svelte @@ -145,6 +145,14 @@ }} options={{ right: 'Disable TLS' }} /> + +