[Imap-uw] Reg. POP UID.

Dister Kemp dister.kemp at gmail.com
Thu Feb 28 00:31:32 PST 2008


Thanks Mark for your help. Sorry about my late reply, but was trying this
method and it did work.

My query on related lines (though not c-client related per se), is:
I find this technique of UID matching a bit arcane for POP
as in the case of a mailbox with 1000s of messages this process
of matching UIDs is a performance overhead. I was wondering
how this is done efficiently(if at all) by the other email clients out
there.

Appreciate your help again.
Dister


On Thu, Feb 21, 2008 at 7:10 AM, Mark Crispin <MRC at washington.edu> wrote:


> POP3 UIDs (UIDL command) are not directly supported by c-client. You

> would have to write your own routine that sends a UIDL command to the POP3

> server and stores the returned UID strings someplace. For example, you

> might add code that does something like this after the mail_exists() call

> in pop3_open() in file pop3.c:

>

> unsigned long msgno;

> char *s,*uid,*r;

> /* send UIDL command */

> if (pop3_send (stream,"UIDL",NIL)

> /* parse replies until "." line */

> while ((s = net_getline (LOCAL->netstream) && strcmp (s,".") &&

> (msgno = strtoul (s,&uid,10)) && uid &&

> (uid = strtok_r (uid," ",&r))) {

> stash_uid (msgno,uid); /* stash the returned UID */

> fs_give ((void **) &s); /* return the line to free storage */

> }

> /* return any final line to free storage */

> if (s) fs_give ((void **) &s);

>

> Then write a stash_uid() routine that does whatever.

>

> On Wed, 20 Feb 2008, Dister Kemp wrote:

> > Hello,

> >

> > I am presently working on an email client on top of UW c-client.

> > I am trying to bring in leave mails on server feature as in many other

> > clients.

> > My interest lies in knowing if c-client supports POP UIDs and if so

> > where and how to manage these with c-client API.

> > I would also like to add in my thanks to the people behind this effort

> > (Mark Crispin and team) for providing this API which has been quite

> > a breeze to import till now.

> >

> > Thanks

> > Dister

> >

>

> -- Mark --

>

> http://staff.washington.edu/mrc

> Science does not emerge from voting, party politics, or public debate.

> Si vis pacem, para bellum.

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman1.u.washington.edu/pipermail/imap-uw/attachments/20080228/baea5960/attachment.htm


More information about the Imap-uw mailing list