This is an automated email from the ASF dual-hosted git repository.
oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new ff0ac602b Fix #2956: let mail-sink use a TLS-capable SMTP transport,
and default to it (#2968)
ff0ac602b is described below
commit ff0ac602b2ed92428a5e5e1464c143b11997ed5c
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Aug 24 18:41:11 2026 +0200
Fix #2956: let mail-sink use a TLS-capable SMTP transport, and default to
it (#2968)
mail-sink hardcoded the plaintext smtp scheme and declared no TLS option,
so an operator could not choose a secure transport and the configured
credentials always crossed the network unencrypted. The sibling
mail-imap-source already uses imaps.
Add a protocol property constrained to smtp/smtps, defaulting to smtps,
and move the scheme into the URI the way spring-rabbitmq-sink already
does. Default connectionPort moves from 25 to the implicit-TLS port 465.
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
---
kamelets/mail-sink.kamelet.yaml | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/kamelets/mail-sink.kamelet.yaml b/kamelets/mail-sink.kamelet.yaml
index dff1050bb..6fe13384a 100644
--- a/kamelets/mail-sink.kamelet.yaml
+++ b/kamelets/mail-sink.kamelet.yaml
@@ -45,8 +45,16 @@ spec:
connectionPort:
description: The mail server port
title: Port
- default: 25
+ default: 465
type: string
+ protocol:
+ title: Protocol
+ description: The mail protocol to use. Use smtps for an implicitly
TLS-encrypted
+ connection; smtp connects in the clear, which sends the configured
+ credentials unencrypted.
+ type: string
+ enum: ["smtp", "smtps"]
+ default: "smtps"
username:
title: Username
description: The username to access the mail box
@@ -126,7 +134,7 @@ spec:
- removeHeaders:
pattern: "ce-*"
- to:
- uri: "smtp:{{connectionHost}}:{{connectionPort}}"
+ uri: "{{protocol}}:{{connectionHost}}:{{connectionPort}}"
parameters:
subject: "{{subject}}"
from: "{{from}}"