Search The ForumSearch   RegisterRegister  LoginLogin

MailBee POP3

 AfterLogic Forum : MailBee POP3
Subject Topic: Optimized searching for new messages Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Shahid
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 23 December 2005 at 12:35am | IP Logged Quote Shahid

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 View Shahid's Profile Search for other posts by Shahid
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 23 December 2005 at 10:07am | IP Logged Quote Alex

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 View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide