nextcloud / nextcloud/mail

Mail can't connect when user has no permission on one of the folders

Open
#1,735 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

When connecting to a mailbox, on a NethServer managed Centos 7 / Dovecot imap server with Shared Mailbox enabled, the client can't connect and fails with You do not have adequate permissions to carry out this operation.

It turned out that for whatever reason the Public folder containing the shared mailboxes is not accessible to anyone; only its subfolder are.

# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
. LOGIN matthieu@mydomain.tld password
. STATUS Public (MESSAGES)
. NO [NOPERM] Permission denied (0.001 + 0.000 secs).

The horde client doesn't seem to like that.

If there are shared mailboxes configured, one cannot configure the mailbox, it fails silently without any error message displayed (there was one with 0.11, not anymore with 0.14). In the log : Horde_Imap_Client_Exception_ServerResponse: You do not have adequate permissions to carry out this operation.

If the shared mailboxes are disabled, one can configure the mailbox.

If the shared mailboxes are enabled back, an exclamation mark appears in front of the account name and the account settings are displayed.

IMAP log :

Mail app

Mail app version: 0.14.0

Mailserver or service: local dovecot server

Server configuration

Operating system: Centos 7.6 / Nethserver 7.6

Web server: Apache

Database: MariaDB

PHP version: 7

Nextcloud Version: 16

Client configuration

Browser: Safari

Operating system: OSX


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Dovecot IMAP failure with STATUS Public when the account can access only its subfolders, then trace the Mail app account-configuration path and the Horde_Imap_Client_Exception_ServerResponse entry in the logs. Done means accounts with shared mailboxes configure successfully and no longer show an error when the parent Public folder is inaccessible.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.