Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAMES-4034 SMTP submission: validate FROM header #2246

Merged
merged 2 commits into from
May 17, 2024

Conversation

chibenwa
Copy link
Contributor

Will ease channel pool sizing as well as debugging of RabbitMQ channelPool related errors.

Will ease channel pool sizing as well as debugging of RabbitMQ channelPool
related errors.
Comment on lines +129 to +134
private boolean fromDoesNotMatchAuthUser(SMTPSession session, Address from) {
if (from instanceof InternetAddress internetAddress) {
try {
MailAddress mailAddress = new MailAddress(internetAddress.getAddress());
return session.getUsername() != null &&
(!fromMatchSessionUser(mailAddress, session) || !belongsToLocalDomain(mailAddress));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is delegated user supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to be supported as

  1. that's the same validation layer than JMAP
  2. the authenticated user is identified as the delegated user (impersonnation)

…/smtpserver/SenderAuthIdentifyVerificationHook.java

Co-authored-by: Trần Hồng Quân <55171818+quantranhong1999@users.noreply.github.com>
@chibenwa chibenwa changed the title 3JAMES-4034 SMTP submission: validate FROM header JAMES-4034 SMTP submission: validate FROM header May 16, 2024
@Arsnael Arsnael merged commit 2ab06c3 into apache:master May 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants