Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Checking for new messages Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Dylan Davison
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 07 February 2006 at 11:05am | IP Logged Quote Dylan Davison

I discovered some things about the webmail pro system that weren't obvious to me at first, so I thought I would share and Alex can correct me if I'm wrong.

When trying to determine if a message has been read or not, you need to get the message_id values from the webmail database, and compare it against the pop3 getmessageUID results returned from your mail server.
The mistake I made was using the wm_messages table message_id field to compare against this value. This works if you have the "delete messages from server" value turned on like I did in testing. But if users are going to be leaving a copy of mail on the server, then you want to use the message_id value from the wm_reads table because it keeps message IDs there even after they have been delete from the webmail system!

The database design is a bit unconventional in the sense that it stores message ids twice. I assume there must have been a major performance benefit to denormalizing this design in that way.
Back to Top View Dylan Davison's Profile Search for other posts by Dylan Davison
 
Dylan Davison
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 07 February 2006 at 11:07am | IP Logged Quote Dylan Davison

Also, there seem to be no enforced table relationships, so if you are manually editing the db, make sure not to strand records!
Back to Top View Dylan Davison's Profile Search for other posts by Dylan Davison
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 08 February 2006 at 8:11am | IP Logged Quote Alex

wm_reads table reflects the state of the mailbox on the mail server.

wm_messages reflects the state of the mailbox in the WebMail Pro database.

UIDs in both tables are not duplicated since you may have different mails in WebMail Pro database and on the mail server.

Actually, having UIDs in wm_reads improves performance of getting new mail since wm_reads is usually much less than wm_messages. Thus, searching wm_reads takes much less time than searching wm_messages.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Dylan Davison
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 08 February 2006 at 10:03am | IP Logged Quote Dylan Davison

Thanks Alex.

Also, I was wondering about something else to do with this.

If a user has set their webmail to leave a copy of messages on the server, and then later they set it to delete messages from the server, will it only delete new messages that are received from the server? or will it actually remove all messages, both new and old from the server the next time it checks mail?

If it does not delete previously downloaded messages, then is there a way through webmail to remove those messages from the mail server via webmail? or would a 3rd party mail client be needed?
Back to Top View Dylan Davison's Profile Search for other posts by Dylan Davison
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 08 February 2006 at 12:06pm | IP Logged Quote Alex

If they initially set "delete messages from the server" checkbox on, collect some mails, and then set this checkbox off, that mails will not get deleted from the server. Only new messages will get deleted.

However, it's easy to delete them from the server:
- tick "delete message from server when it's deleted from trash" checkbox
- delete that mails
- go to Trash and click Empty Trash

Mails will get deleted from WebMail db and from the mail server.

However, if you wish to delete them from the mail server but leave them intact in WebMail Pro database, you have to use another mail client which provides direct access to the mailbox (such as WebMail Lite).

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
EasyConnect
Newbie
Newbie


Joined: 08 November 2005
Online Status: Offline
Posts: 5
Posted: 13 April 2006 at 7:21am | IP Logged Quote EasyConnect

Hi Alex,

I was searching for wm_reads on the forum and found this discussion.
My problem is that I now have 1.2 million records in wm_reads and I wonder how to reduce this.
wm_reads should be a mirror of whats on the mail-server, but we have defined rules for deleting mails on the server.
When a mail is deleted on the server this is not reflected in the wm_reads table.
Does there exist a routine so we can 'syncronize' wm_reads? - or what would you recommend?

Regards

Erik Borgen
Back to Top View EasyConnect's Profile Search for other posts by EasyConnect
 
EasyConnect
Newbie
Newbie


Joined: 08 November 2005
Online Status: Offline
Posts: 5
Posted: 13 April 2006 at 8:24am | IP Logged Quote EasyConnect

Hi alex,

Addition to my previous question:

There are a lot of duplicates in wm_reads
If I eliminate duplicates on user_id, messsage_id, I only get 4936 records (compared to a total of 1.2 million).
So my next question: why do I have duplicates?
Back to Top View EasyConnect's Profile Search for other posts by EasyConnect
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 13 April 2006 at 11:50am | IP Logged Quote Alex

Thank you for the bug report. We're working on it now and we will send you the update along with the corresponding instructions (describing how to clean up your database) via e-mail as soon as possible (approximately - tomorrow). We're sorry for inconvenience.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 14 April 2006 at 6:33am | IP Logged Quote Alex

Thank you for the bug report.

This bug has been fixed in MailBee WebMail Pro v3.3. We have already mailed you how to download and install the new version of MailBee WebMail Pro.

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