From: Art Cancro Date: Fri, 19 Oct 2007 03:58:20 +0000 (+0000) Subject: Retrieve POP3 UIDL for each message. (Not yet doing X-Git-Tag: v7.86~2941 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=36ad322c33d285cb4a97009593ec1a026f52649e;p=citadel.git Retrieve POP3 UIDL for each message. (Not yet doing anything with it but we need to build a UIDL map in order to offer a 'leave messages on server' option). --- diff --git a/citadel/modules/pop3client/serv_pop3client.c b/citadel/modules/pop3client/serv_pop3client.c index c50d080f4..82937f891 100644 --- a/citadel/modules/pop3client/serv_pop3client.c +++ b/citadel/modules/pop3client/serv_pop3client.c @@ -57,6 +57,7 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 char *body = NULL; struct CtdlMessage *msg = NULL; long msgnum = 0; + char this_uidl[64]; lprintf(CTDL_DEBUG, "POP3: %s %s %s \n", roomname, pop3host, pop3user); lprintf(CTDL_NOTICE, "Connecting to <%s>\n", pop3host); @@ -121,6 +122,15 @@ void pop3_do_fetching(char *roomname, char *pop3host, char *pop3user, char *pop3 if (num_msgs) for (i=0; i%s\n", buf); + if (strncasecmp(buf, "+OK", 3)) goto bail; + extract_token(this_uidl, buf, 3, ' ', sizeof this_uidl); + /* Tell the server to fetch the message */ snprintf(buf, sizeof buf, "RETR %d\r", msglist[i]); lprintf(CTDL_DEBUG, "<%s\n", buf);