Tom Hughes writes: > I am the developer of piece of IMAP client software and one of my > users complained that new mail was not being detected correctly with > his Courier IMAP server. > > Having reviewed the logs of my clients communications with his server > this seems to be a problem with the server. > > To demonstrate what happens, here is what I get when I poll the > mailbox before any new mail arrives: > > 0024 STATUS "INBOX" (MESSAGES UIDNEXT) > * STATUS "INBOX" (MESSAGES 107 UIDNEXT 110) > 0024 OK STATUS Completed. > > At this point the mailbox contains 107 messages and the next message > to arrive will have a UID of 110. After the new message arrives, this > is what I get: > > 0007 STATUS "INBOX" (MESSAGES UIDNEXT) > * STATUS "INBOX" (MESSAGES 108 UIDNEXT 110) > 0007 OK STATUS Completed. > > Notice that although the message count has gone up, the UIDNEXT value > is still the same which can't be true, as the new message should have
Although I will correct UIDNEXT, your method for checking of new mail is wrong. A UIDNEXT comparison would only be valid if the folder's UIDVALIDITY remained the same, which you fail to check for. Furthermore, RFC 2060 does not require the folder's UIDVALIDITY to remain constant all the time. A compliant implementation could be, for example, UIDVALIDITY being simply the current system time, with all messages in the folder always having a monotonically increasing UID starting at 1. In short, this is not the correct way to check for new mail anyway. -- Sam _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
