diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index 2104f8ba8c..9923d56e66 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -01f384348341c87c5a0b32c4be7c699975ee7d6d \ No newline at end of file +aedaf655693cb9bab59fcf79a48c60aad6822668 \ No newline at end of file diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 2c5a8cec85..3b0d784bd7 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -724,6 +724,8 @@ paths: type: string tls_implicit: type: boolean + disable_tls: + type: boolean required: - host - username @@ -731,6 +733,7 @@ paths: - port - from - tls_implicit + - disable_tls required: - to - smtp diff --git a/backend/windmill-common/src/server.rs b/backend/windmill-common/src/server.rs index 9fb39ad18b..b0c768a86f 100644 --- a/backend/windmill-common/src/server.rs +++ b/backend/windmill-common/src/server.rs @@ -10,6 +10,7 @@ pub struct Smtp { pub port: u16, pub from: String, pub tls_implicit: Option, + pub disable_tls: Option, } #[derive(Serialize, Deserialize, PartialEq)] @@ -20,6 +21,7 @@ pub struct SmtpConfigOpt { pub smtp_port: Option, pub smtp_from: Option, pub smtp_tls_implicit: Option, + pub smtp_disable_tls: Option, } pub async fn load_smtp_config(db: &DB) -> error::Result> { @@ -39,6 +41,7 @@ pub async fn load_smtp_config(db: &DB) -> error::Result> { username, password, tls_implicit: config.smtp_tls_implicit, + disable_tls: config.smtp_disable_tls, port: config.smtp_port.unwrap_or(587), from: config .smtp_from @@ -60,6 +63,9 @@ pub async fn load_smtp_config(db: &DB) -> error::Result> { tls_implicit: std::env::var("SMTP_TLS_IMPLICIT") .ok() .and_then(|p| p.parse().ok()), + disable_tls: std::env::var("SMTP_DISABLE_TLS") + .ok() + .and_then(|p| p.parse().ok()), port: std::env::var("SMTP_PORT") .ok() .and_then(|p| p.parse().ok()) @@ -87,6 +93,7 @@ impl Default for SmtpConfigOpt { smtp_port: None, smtp_tls_implicit: None, smtp_username: None, + smtp_disable_tls: None, } } } diff --git a/frontend/src/lib/components/InstanceSettings.svelte b/frontend/src/lib/components/InstanceSettings.svelte index 9cdd9f165f..f9b2c90151 100644 --- a/frontend/src/lib/components/InstanceSettings.svelte +++ b/frontend/src/lib/components/InstanceSettings.svelte @@ -1014,12 +1014,26 @@
+
+ { + if (values[setting.key].smtp_disable_tls) { + values[setting.key].smtp_tls_implicit = false + } + }} + options={{ right: 'Disable TLS' }} + label="Disable TLS" + /> +
{/if} {:else if setting.fieldType == 'object_store_config'} @@ -1082,7 +1096,8 @@ password: smtp['smtp_password'], port: smtp['smtp_port'], from: smtp['smtp_from'], - tls_implicit: smtp['smtp_tls_implicit'] + tls_implicit: smtp['smtp_tls_implicit'], + disable_tls: smtp['smtp_disable_tls'] } } })