#11371·windmill

bug: sync-config silently drops smtp_clicktracking_off from smtp_settings

Author: iamkrootCreated Sep 26, 2026Updated Sep 26, 2026
Labelswebmux_oneshot

Describe the bug

When applying instance configuration via windmill sync-config <config.yaml>, any smtp_clicktracking_off key specified under global_settings.smtp_settings is silently dropped during deserialization. It is omitted from the JSON persisted to the global_settings table, causing the "Disable click tracking on links" toggle in the Instance Settings UI to remain off (false).

To reproduce

  1. Create a windmill-config.yaml with:
yaml
global_settings:
  smtp_settings:
    smtp_host: "smtp.example.com"
    smtp_port: 587
    smtp_clicktracking_off: true
  1. Run windmill sync-config /path/to/windmill-config.yaml.
  2. Open Windmill Web UI -> Instance Settings -> SMTP configuration.
  3. Observe that the toggle "Disable click tracking on links" is still unchecked (false), and inspecting the global_settings table in Postgres (SELECT value FROM global_settings WHERE name = 'smtp_settings';) shows smtp_clicktracking_off was omitted.

Expected behavior

smtp_clicktracking_off: true should be parsed and persisted into global_settings, and the toggle in Instance Settings should reflect true.

Application version

v1.818.0

Additional Context

Root Cause: In backend/windmill-common/src/instance_config.rs, the SmtpSettings struct lacks smtp_clicktracking_off:

rust
pub struct SmtpSettings {
    pub smtp_host: Option<String>,
    pub smtp_username: Option<String>,
    pub smtp_password: Option<StringOrSecretRef>,
    pub smtp_port: Option<u16>,
    pub smtp_from: Option<String>,
    pub smtp_tls_implicit: Option<bool>,
    pub smtp_disable_tls: Option<bool>,
}

Unlike GlobalSettings and OAuthClient, SmtpSettings does not have a catch-all extra field (#[serde(flatten)]). Serde ignores smtp_clicktracking_off during deserialization, and to_settings_map() serializes the struct back to JSON without it.

Meanwhile, frontend/src/lib/components/instanceSettings/SmtpSettings.svelte binds the toggle to $values['smtp_settings'].smtp_clicktracking_off.

Suggested Fix: Add pub smtp_clicktracking_off: Option<bool> (or #[serde(flatten)] pub extra: BTreeMap<String, serde_json::Value>) to SmtpSettings in backend/windmill-common/src/instance_config.rs.