Author |
|
Shahid Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 23 December 2005 at 12:35am | IP Logged
|
|
|
Hi,
I understand that to read only new messages I need to keep a track of all the UIDs of messages that I have already read.
I want to optmize this by storing the MAX value of UID read and then search for UID only greater than MAX. Is it possible?
Is there any other way of optimizing the
I need to optimize as the number of mails will be very high and searching through all of read UIDs in the Database for all UID in the MailBox will make it too slow.
I have a the following related questions:
1. Will the latest message have the MAX UID?I reckon it will
2.Is the sequencing of messages in any order? (sorted on UID etc)
any help on optimization will be highly appreciated
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 23 December 2005 at 10:07am | IP Logged
|
|
|
Quote:
I want to optmize this by storing the MAX value of UID read and then search for UID only greater than MAX. Is it possible?
|
|
|
UID is a string. "MAX" term cannot be applied to POP3 UIDs. For instance, the below are two UIDs: r74vasadx, 03xksd73u. Although some mail servers (like CommuniGate) indeed use integer UIDs in POP3 mode, this is not a common behaviour.
However, you can use IMAP4 protocol (and MailBee.IMAP4 component) instead. IMAP4 UIDs are ascending integer numbers. Also, IMAP4 protocol supports read/unread status, etc.
Quote:
1. Will the latest message have the MAX UID?I reckon it will |
|
|
From the above, this is true only for IMAP4.
Quote:
2.Is the sequencing of messages in any order? (sorted on UID etc) |
|
|
For IMAP4, UIDs array will be a list of constantly increasing values (starting from 1). For POP3, this depends on the mail server implementation.
Regards,
Alex
|
Back to Top |
|
|