Subject: POP3 and mail_search_full for unseen msgs

From: Hollis Blanchard <[email-masked]>
Date: Sun, 23 Jul 2000 13:40:04 +0900

Ok I'm sure this is an easy one, but I think I actually read the entire
c-client_archive and didn't see it mentioned. (Unless I'm describing
"POP3 UIDL"?)

Yes I know POP3 is old and sucky, I just want to get a list of unread
mail.

I'm using imap-2000 RC3. I'm calling mail_search_full with search.unseen
= 1 (and everything else zeroed). This works great for local mailboxes
("mbox" is the proper term?), but when I try it on a POP3 server
mm_searched gets called for *every* message, starting at #1. (Only 1 or
2 messages, at the end of the 400-msg mailbox, are unread.)

I'm sure this is either a "limitation in the POP3 protocol" ;) or a
programmer error. If the former, is there a workaround?

-Hollis
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Mon, 31 Jul 2000 22:29:04 -0700 (PDT)

On Sun, 23 Jul 2000 13:40:04 +0900, Hollis Blanchard wrote:
> mm_searched gets called for *every* message, starting at #1.

> programmer error. If the former, is there a workaround?

This is a limitation of the POP3 protocol.

"Seen" vs. "unseen" status is something that does not exist in POP3 in any
way.  The only way to do what you want would be to remember UIDs from the
previous POP3 session and use the optional POP3 UIDL command (which isn't
supported by the c-client POP3 client code, because POP3 UIDs are not well
behaved like IMAP UIDs).