Andrea Cosentino created CAMEL-23522:
----------------------------------------

             Summary: camel-mail: filter mail.smtp.* / mail.smtps.* namespace 
from producer headers
                 Key: CAMEL-23522
                 URL: https://issues.apache.org/jira/browse/CAMEL-23522
             Project: Camel
          Issue Type: Improvement
          Components: camel-mail
            Reporter: Andrea Cosentino
            Assignee: Andrea Cosentino
             Fix For: 4.21.0, 4.18.3, 4.14.8


MailProducer.getSender extracts exchange headers starting with mail.smtp. / 
mail.smtps. and applies them as JavaMail session properties (introduced in 
CAMEL-14595). In line with the header-filter consistency work in CAMEL-23222, 
this namespace is Camel-internal - only MailProducer interprets it - and should 
be treated the same way.

Proposal:

1. Add a @UriParam flag on MailConfiguration (suggested 
useJavaMailSessionPropertiesFromHeaders, default false) gating the extraction 
in MailProducer.getSender.

2. Extend MailHeaderFilterStrategy to filter mail.smtp. / mail.smtps. on the 
inbound path.

3. Doc note in mail-component.adoc + upgrade-guide entry.

4. Tests for both flag values.

_Claude Code on behalf of Andrea Cosentino_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to