Subject: POP3 & The Search For New Mail

From: Hollis Blanchard <[email-masked]>
Date: Tue, 25 Jul 2000 17:24:08 +0900

Ok, so I've found c-client/pop3.c, which says (among other things) that
there is no searching for POP3 at all. So it seems my only option is to
download all messages and examine their elt->unseen flag one by one.

I think I can live with that, but I just have one question: is this
method how "real" email clients download new mail? When I start up
Netscape Mail (which sadly is the best mail client I've found for my
needs), does it download all 400 messages from the server and just
ignore the ones it has already downloaded? A quick yes or no...

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

---

From: Greg Copeland <[email-masked]>
Date: Wed, 26 Jul 2000 11:18:34 -0500

Hollis,

    This logic seems to work pretty well for me.  If you find a better
way, please let me know.  So, here goes.  If you keep a count of the
number of messages on the account (last) for comparision, you can use it
to determine if there is new mail.  So, if the last count is less than the
new count, then you know you have (new - last) new messages.  If, on the
other hand, new is less than last, you know that something is odd with the
account.  This may be an indication that all messages need to be fetched
or that messages have been previously fetched and deleted.  Obviously, if
last = new then you know there are not any new messages to worry about.
If you wanted to be feel better about the state of the mailbox, you can
always fetch the last message that you know you SHOULD have and compare
it's message id.  If it is not the same message id, then it probably means
you need to fetch all of the messages as it is probably a new batch of
emails even if the new count is greater than last.

Hope this helps,
    Greg

---

From: Hollis Blanchard <[email-masked]>
Date: Wed, 26 Jul 2000 02:28:29 +0900

Greg Copeland wrote:
> 
>     This logic seems to work pretty well for me.
[snip good-sounding plan for a connected POP3 client to keep itself
current]

Actually I had to amend my plan even further (much to my dismay). I
could have sworn I was getting valid elt flags off of POP3 mails... but
I must have been mistaken. elt->seen for my POP3 mail is *always* 0,
regardless of the actual status (which a local mutt knows about, but
apparently it doesn't translate via POP3 well).

The app I'm hacking on syncs mail to a Palm OS pda, so luckily for me I
can get away with a one-time load of the entire mailbox (and compare
each message with every mail already on the handheld.. how many N's is
that? ;). But I'm sure I would be sad if I actually wanted to make a
real email client w/ POP3 support.

-Hollis