Server connection creation denied because of write-only public folders
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 348
- Avg merge
- 12h 28m
- Merged PRs (30d)
- 91
Description
Steps to reproduce
- Set up an IMAP account with write-only public folders
- Try to add a mail server connection to this account
- "IMAP error synchronizing account"
Expected behavior
While reading the public folder structure it is quite ok to have write-only folders, e.g. system/user-wide spam folders for bayesian learning are write-only for security reasons.
Actual behavior
The IMAP log on the mail server shows
..
<-- 15 STATUS "Public Folder/Bayesian Learning/Non-Spam" (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
--> 15 NO Access denied
<-- 16 STATUS "Public Folder/Bayesian Learning/Spam" (MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)
--> 16 NO Access denied
<-- 17 LOGOUT
And the mail account setup fails with the above error message.
Mail app version
2.2.7
Mailserver or service
Exchange
Operating system
Debian
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database
MySQL
Additional info
nextcloud.log:
{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php","Line":4601},"message":"Could not load account mailboxes: IMAP error synchronizing account 3: IMAP error reported by server.","exception":[],"CustomMessage":"Could not load account mailboxes: IMAP error synchronizing account 3: IMAP error reported by server."},"id":"64xxx"}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing account setup with Exchange write-only public folders and inspect the IMAP failure reported from apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Socket.php around line 4601. Trace the mailbox-loading path and verify that denied STATUS responses for write-only folders no longer prevent the account from being created or synchronized.
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
- Mostly clear
- Newbie friendliness
- 38/100