1

There is Dovecot service on the server. I had moved messages in user mailbox manually from one to another. Now I am experiencing some sorting problem on iOS device. For example:

  • I have mail 2 days old. (Message A)
  • I moved older mail to same directory (via ssh)
  • Thunderbird and Roundcube works fine.

But on my iPhone I had to configure mail account again. Unfortunately, the messages were in wrong order after sync. Now I must scroll down for ages to get the Message A.

I found, that iOS mail client doesn't support sorting of messages. Is any possibility to re-sort every message via it's date header, or force Dovecot to return messages in required order?

Telnet returns:

OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS LOGINDISABLED AUTH=CRAM-MD5] Dovecot (Ubuntu) ready.

after login:

4 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE BINARY MOVE] Logged in

I had found, that Dovecot SORT extension works out of box. Is there any method to force sorting by date?

1

Dovecot has an index inside maildir where all the messages, delivered via imap are indexed. Manually moved messages are not included into the index and thus they are out of order.

All you have to do - is to reindex maildir manually with doveadm utility:

doveadm index -u username Inbox

Further reading can be found here: http://wiki2.dovecot.org/Tools/Doveadm/Index

  • i tried it again, result was: Info: INBOX: Cache is already up to date but when I read inbox directory using method without sorting (raw read with PHP), the messages are unordered – Tomasz Jun 3 '14 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.