When running getMailboxes(), it errors with a "cannot reopen" message.
How to reproduce: code & error stack trace
Where $connection is a working connection, this code results in the following error:
$mailboxes = $connection->getMailboxes();
In ImapResource.php line 61:
Cannot reopen mailbox "dovecot.sieve"
imap_alerts (0):
imap_errors (1):
- [SERVERBUG] Internal error occurred. Refer to server log for more information. [2023-12-29 15:33:58] (0.001 + 0.000 secs).
Expected behavior
There is no dovecot.sieve mailbox. So the getMailboxes() method should not be trying to open it.
The only dovecot.sieve in the authenticated account is a symlink.
So, after digging into the php code a bit, I couldn't see where it would be responsible for detecting if a mailbox was actually a symlink to a file. I'm 90% certain that is actually up to the IMAP server itself. Dovecot in my case.
So, for some reason I think Dovecot is reporting a symlink to my sieve script as a mailbox.
Which means the solution is to make Dovecot not do that.
I'm posting this here just in case someone down the road hits the same issue I did.
Summary
Running getMailboxes() fails.
Current behavior
When running getMailboxes(), it errors with a "cannot reopen" message.
How to reproduce: code & error stack trace
Where
$connection
is a working connection, this code results in the following error:Expected behavior
There is no dovecot.sieve mailbox. So the getMailboxes() method should not be trying to open it.
The only
dovecot.sieve
in the authenticated account is a symlink.Solution?
So, after digging into the php code a bit, I couldn't see where it would be responsible for detecting if a mailbox was actually a symlink to a file. I'm 90% certain that is actually up to the IMAP server itself. Dovecot in my case.
So, for some reason I think Dovecot is reporting a symlink to my sieve script as a mailbox.
Which means the solution is to make Dovecot not do that.
I'm posting this here just in case someone down the road hits the same issue I did.