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

listmailbox returns empty list for users with dot in their name #1875

Closed
mmatuska opened this issue Mar 30, 2017 · 8 comments
Closed

listmailbox returns empty list for users with dot in their name #1875

mmatuska opened this issue Mar 30, 2017 · 8 comments
Labels
3.0 affects 3.0

Comments

@mmatuska
Copy link
Contributor

In cyrus-imapd 3.0, listmailbox does not show any mailboxes for users with dot in their name.

@elliefm
Copy link
Contributor

elliefm commented Apr 3, 2017

In your imapd.conf, what is unixhierarchysep set to?

@elliefm elliefm added the 3.0 affects 3.0 label Apr 3, 2017
@mmatuska
Copy link
Contributor Author

mmatuska commented Apr 3, 2017

I have always been using:
altnamespace: yes
unixhierarchysep: yes

It worked well with 2.5.x. Other operations like create / rename or delete mailbox and ACL management do work. Just listmailbox is broken for me with 3.0 (and only for users with a dot in their name). Dots in names of submailboxes work well, too.I will run it through gdb and tell you more when I have more time.

@brong
Copy link
Member

brong commented Apr 6, 2017

I'd like to have a Cassandane test to prove this, and just looking at this code it's almost certainly a horror show in there already and should probably be simplified rather than made even more complex! Thanks for the patch - if it solves the issue without breaking other cases, we'll definitely add it in, and make a note to refactor that code to simplify everything.

Cheers,

Bron.

@mmatuska
Copy link
Contributor Author

mmatuska commented Apr 6, 2017

I wonder that this important issue didn't show up in your tests. Changing unixhierarchysep to yes by default and having a broken listmailbox for users with a dot in their name is a major issue IMHO.

@brong
Copy link
Member

brong commented Apr 6, 2017 via email

@brong
Copy link
Member

brong commented Apr 6, 2017

Thanks for fixing this for us. Our tests are over in the cassandane repository. You can see the tests I used to confirm the bug and the fix here:

cyrusimap/cassandane@f39411f

Unfortunately, our test coverage is nowhere near comprehensive, and nobody had built a test for this particular case before. At least it won't get broken again now!

If you have any other things about Cyrus behaviour that you particularly want to make sure are never broken, additional tests are very welcome too.

@mmatuska
Copy link
Contributor Author

mmatuska commented Apr 6, 2017

Thank you for implementing the tests, they look good. How does your merging policy to the 3.0 branch look like?

Of course, users with dots in their username didn't even work without unixhierarchysep set to yes, so it's not as if changing the default made any difference. It's definitely a legitimate bug though.

Just to clarify - I don't understand your wording:

didn't even work without unixhierarchysep set to yes

Users cannot have dots in names without unixhierarchysep set to yes by definition as dot acts as a hierarchy separator in that case (tom.tester means "submailbox tester of user tom" without unixhierarchysep: yes).

@elliefm
Copy link
Contributor

elliefm commented Apr 7, 2017

How does your merging policy to the 3.0 branch look like?

If it fixes stuff that's broken, and doesn't change stuff that's not, it's mergeable. I'm just in the process of merging your patch over to the 3.0 branch now, thanks! It'll be in release 3.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 affects 3.0
Projects
None yet
Development

No branches or pull requests

3 participants