[Dovecot] Order of emails
Hi
We have an issue regarding the order in which emails are displayed in an imap folder, which our customers regularly complain about. By default, emails are returned from a folder in the order in which they were placed into the folder, which makes perfect sense. However, if an email is moved into another folder, it will always appear at the top, no matter how old it is.
We could order the emails ourselves before displaying them in our webmail program. However, this would mean parsing the headers of every single email, which could be many thousands, so would slow things down considerably and greatly increase load. At the moment, we only read 30 at a time as the user pages through the folder.
From what I can see, the order is determined by the timestamp in the email filename, which gets updated every time the email is moved. Is there any way we could disable this, so the filename (or at least the timestamp part of it) remains constant? If so, would this affect in any way the behaviour of other imap clients, such as Outlook?
All suggestions welcome.
Thanks
Marcus
Marcus Don Applications Development Manager Namesco Limited
Main Line: +44 (0)870 120 8888 Main Fax: +44 (0)870 120 8008 Tech Support: +44 (0)870 162 4950 Email: mdon@names.co.uk Website: http://www.names.co.uk Address: Acton House, Perdiswell Park, Worcester, WR3 7GD
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
---------------------------------------
| Free Dial-up - no need to register! |
---------------------------------------
Namesco Limited provides Free dialup access to anyone that wishes to use it. You do not even have to be a customer, there is no need to register and is especially handy if you are unable to connect with your current provider. Simply use the following details:
Dialup Number: 0844 535 2100*
Username: namesco
Password: easydialup
- Local call rate charges apply, 33% Cheaper than BT's 0845 local call rate.
If you need any help in configuring the Free Dial-up service on your computer, please do not hesitate to call us on 0870 162 4950.
On Friday 09 Dec 2005 14:14, Marcus Don wrote:
All suggestions welcome.
Can you not make your webmail client send the appropriate IMAP4 SORT command when getting email?
Dovecot claims to support SORT and THREAD extensions (well it claims that in the front page of the site).
Marcus Don wrote:
Hi
We have an issue regarding the order in which emails are displayed in an imap folder, which our customers regularly complain about. By default, emails are returned from a folder in the order in which they were placed into the folder, which makes perfect sense. However, if an email is moved into another folder, it will always appear at the top, no matter how old it is.
We could order the emails ourselves before displaying them in our webmail program. However, this would mean parsing the headers of every single email, which could be many thousands, so would slow things down considerably and greatly increase load. At the moment, we only read 30 at a time as the user pages through the folder.
From what I can see, the order is determined by the timestamp in the email filename, which gets updated every time the email is moved. Is there any way we could disable this, so the filename (or at least the timestamp part of it) remains constant? If so, would this affect in any way the behaviour of other imap clients, such as Outlook?
Marcus,
Did you look at an earlier thread (around 19 November) with the subject "Sorting messages by date"?
John
-- John Allen Bofferdange, Luxembourg allen@vo.lu http://www.homepages.lu/allen
On Fri, 2005-12-09 at 14:14 +0000, Marcus Don wrote:
We have an issue regarding the order in which emails are displayed in an imap folder, which our customers regularly complain about. By default, emails are returned from a folder in the order in which they were placed into the folder, which makes perfect sense. However, if an email is moved into another folder, it will always appear at the top, no matter how old it is.
Many IMAP clients show the emails sorted by messages' unique ID number by default. The UID is always growing, so when copying mail to another mailbox, it always gets the highest UID.
Messages have two timestamps. One is "received time" or "internaldate" as IMAP likes to call it. This timestamp is preserved while copying the message, and this is what IMAP clients should using for sorting.
Another date is the "Date" header in the message itself, but since it can be faked it's usually better to sort by the received time instead.
In any case, the timestamp in mail's filename has nothing to do with how clients see the mail sorted.
Received time is stored in file's timestamp. If it changes while copying, it's a bug. But it worked just fine with me when I just tried.
participants (4)
-
John and Catherine Allen
-
Marcus Don
-
Simon Waters
-
Timo Sirainen