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

Team mailboxes over IMAP #1272

Open
2 tasks
chibenwa opened this issue Oct 30, 2024 · 3 comments · May be fixed by #1311
Open
2 tasks

Team mailboxes over IMAP #1272

chibenwa opened this issue Oct 30, 2024 · 3 comments · May be fixed by #1311
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@chibenwa
Copy link
Member

Following the merge of apache/james-project#2445

Write a TwakeMailNamespaceSupplier and a TwakeMailMailboxNameConverter that would...

  • Treat #private.xxx and directly xxx as user private
  • Treat #user.bob.xxx as other user mailboxes
  • Treat #team-mailbox.marketting.xxx as a shared mailbox

Definition of done

  • In depth unit tests for TwakeMailNamespaceSupplier and TwakeMailMailboxNameConverter

  • This changeset would test in depth the NAMESPACE and LIST. Other commands can be lightly tested (status command only is OK). We can mimic ImapServerTest but on top of a Twake mail memory server.

@chibenwa chibenwa added enhancement New feature or request good first issue Good for newcomers labels Oct 30, 2024
@chibenwa
Copy link
Member Author

Spotted on imap.linagora.com

org.apache.james.imap.main.DeniedAccessOnSharedMailboxException: null
	at org.apache.james.imap.main.PathConverter$Default.asMailboxPath(PathConverter.java:119)
	at org.apache.james.imap.main.PathConverter$Default.buildAbsolutePath(PathConverter.java:97)
	at org.apache.james.imap.main.PathConverter$Default.buildFullPath(PathConverter.java:81)
	at org.apache.james.imap.processor.AbstractSelectionProcessor.processRequestReactive(AbstractSelectionProcessor.java:105)
	at org.apache.james.imap.processor.AbstractSelectionProcessor.processRequestReactive(AbstractSelectionProcessor.java:82)
	at org.apache.james.imap.processor.AbstractMailboxProcessor.doProcess(AbstractMailboxProcessor.java:98)
	at org.apache.james.imap.processor.AbstractMailboxProcessor.doProcess(AbstractMailboxProcessor.java:75)
	at org.apache.james.imap.processor.base.AbstractProcessor.processReactive(AbstractProcessor.java:52)
	at org.apache.james.imap.processor.DefaultProcessor.processReactive(DefaultProcessor.java:158)
	at org.apache.james.imapserver.netty.ImapChannelUpstreamHandler.channelRead(ImapChannelUpstreamHandler.java:410)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1475)
	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1338)
	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1387)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.lang.Thread.run(Unknown Source)

Asking the user, we spotted halth exposed team mailboxes over IMAP

Thus this becomes a priority topic.

@vttranlina vttranlina self-assigned this Nov 15, 2024
@vttranlina vttranlina linked a pull request Nov 15, 2024 that will close this issue
@vttranlina
Copy link
Member

wip pr #1311

@chibenwa
Copy link
Member Author

It is a simple fix to disable them in LIST mailbox when using default naming scheme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants