Hi guys!
This is really annoying. On the command to dovecot over imapc from another one: "UID SEARCH ALL" I get my UIDs: "* SEARCH 1 2 3 4" But when sending: "UID SORT (REVERSE ARRIVAL) US-ASCII NOT DELETED" I get literally nothing: "* SORT"
Sorry, but this is a bug. Thank you!
On 27/06/2026 00:25 EEST inaugurator--- via dovecot <dovecot@dovecot.org> wrote:
Hi guys!
This is really annoying. On the command to dovecot over imapc from another one: "UID SEARCH ALL" I get my UIDs: "* SEARCH 1 2 3 4" But when sending: "UID SORT (REVERSE ARRIVAL) US-ASCII NOT DELETED" I get literally nothing: "* SORT"
Sorry, but this is a bug. Thank you!
Can you please describe your setup more and provide doveconf -n output from both systems and check logs for any errors or warnings?
Aki
I am trying to make a minimal config that reproduces the issue, because my original config is too big and not worth your time. No leads so far: there are no error messages in the logs, even in debug mode. I can't figure out what the difference is yet.
SEARCH returns UIDs.
A003 SELECT shared/myuser/INBOX.
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft $HasNoAttachment).
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $HasNoAttachment \*)] Flags permitted..
- 2 EXISTS.
- 0 RECENT.
- OK [UNSEEN 1] First unseen..
- OK [UIDVALIDITY 1782572150] UIDs valid.
- OK [UIDNEXT 3] Predicted next UID.
- OK [HIGHESTMODSEQ 20] Highest. A003 OK [READ-WRITE] Select completed (0.022 + 0.000 + 0.021 secs).. A004 UID SEARCH ALL.
- SEARCH 1 2. A004 OK Search completed (0.001 + 0.000 secs).. A005 LOGOUT.
SORT not.
A003 SELECT shared/myuser/INBOX.
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft $HasNoAttachment).
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $HasNoAttachment \*)] Flags permitted..
- 2 EXISTS.
- 0 RECENT.
- OK [UNSEEN 1] First unseen..
- OK [UIDVALIDITY 1782572150] UIDs valid.
- OK [UIDNEXT 3] Predicted next UID.
- OK [HIGHESTMODSEQ 20] Highest. A003 OK [READ-WRITE] Select completed (0.109 + 0.000 + 0.108 secs).. A004 UID SORT (REVERSE ARRIVAL) US-ASCII NOT DELETED.
- SORT. A004 OK Sort completed (0.002 + 0.000 secs).. A005 LOGOUT.
I need help. I’m trying to reproduce an issue, but I keep hitting so many errors that I’m completely stuck. I'm reproducing this on a single machine.
- Setting up the environment:
groupadd -g 500 vmail && useradd -M -u 500 -g vmail -s /bin/false vmail && mkdir -p /tmp/mail && chown vmail:vmail /tmp/mail
- Starting up Dovecot.
- User mailboxes don’t exist yet.
- Saving an email via CLI:
doveadm save -u user1 -m INBOX /tmp/1.eml
- Checking the email UID, but it’s missing:
curl -u "user1:hello" -k imap://localhost:143/INBOX -X "UID SEARCH ALL"
- SEARCH
- Saving the exact same email via APPEND:
curl -u "user1:hello" -k imap://localhost:143/INBOX --upload-file /tmp/1.eml
- Now the UID shows up. But which one? What’s the difference here?
curl -u "user1:hello" -k imap://localhost:143/INBOX -X "UID SEARCH ALL"
- SEARCH 1
- Restarting Dovecot.
- Checking the UID again. And it's gone! Where did it go? It's right there in the indexes.
curl -u "user1:hello" -k imap://localhost:143/INBOX -X "UID SEARCH ALL"
- SEARCH
- The email files are right there in new/. The entries are in dovecot-uidlist. They're also in dovecot.index.cache.
- I share rights with user2.
doveadm acl add -u user1 INBOX user=user2 lookup read write write-seen write-deleted insert post expunge create delete admin
- The entry in /tmp/mail/shared.db showed up. However, user2 still can't see that user1's INBOX has been shared with them. No shared namespace.
curl -u "user2:hello" -k imap://localhost:143/
- LIST (\HasNoChildren) "/" INBOX
- When I try to connect the same way imapc does, I get an error saying the mailbox doesn't exist.
curl -u "user1*user2:hello" -k imap://localhost:143/INBOX -X "UID SEARCH ALL" A003 NO [NONEXISTENT] Mailbox doesn't exist: INBOX (0.002 + 0.000 + 0.001 secs)
- But this is not true.
$ tree -a /tmp/mail/ /tmp/mail/ ├── shared.db └── user1 ├── dovecot-acl-list ├── dovecot.list.index.log ├── dovecot-uidvalidity ├── dovecot-uidvalidity.6a4029ad └── .INBOX ├── cur ├── dovecot-acl ├── dovecot.index.cache ├── dovecot.index.log ├── dovecot-uidlist ├── maildirfolder ├── new │ └── 1782589869.M440304P1305393.mail.test.server,S=3517,W=3584 └── tmp
- From debug log. I did not set this options. Like it is something inside logic.
Debug: Ignored unknown userdb field: master_user=user2
- Here’s what my config looks like.
dovecot_config_version = 2.4.4 dovecot_storage_version = 2.4.4
mail_debug = yes
acl_driver = vfile auth_master_user_separator = * auth_allow_cleartext = yes mail_driver = maildir mail_home = /tmp/mail/%{user} mail_path = ~ mail_inbox_path = ~/.INBOX mail_index_path = ~ mail_control_path = ~ mail_uid = vmail mail_gid = vmail first_valid_uid = 500 mail_shared_explicit_inbox = yes
imapc_host = 127.0.0.1 imapc_master_user = %{user} imapc_password = any imapc_port = 143
service auth { unix_listener auth-userdb { mode = 0660 user = vmail group = vmail } unix_listener auth-master { mode = 0660 group = vmail } }
acl_sharing_map { dict file { path = /tmp/mail/shared.db } }
protocols { imap = yes }
mail_plugins { acl = yes }
protocol imap { mail_plugins { imap_acl = yes } }
service imap-login { inet_listener imaps { port = 0 } }
passdb anypass-imapc { master = yes driver = static fields { nopassword = yes userdb_acl_user = %{auth_user} } }
passdb anypass-users { driver = static fields { nopassword = yes } }
namespace inbox { inbox = yes separator = / }
namespace shared { type = shared separator = / prefix = shared/$user/ acl_ignore = yes list = children subscriptions = no mail_driver = imapc mail_path = ~/shared/%{owner_user} mail_index_path = ~/shared/%{owner_user} mail_control_path = ~/shared/%{owner_user} }
participants (2)
-
Aki Tuomi
-
inaugurator@ya.ru