]> Pileus Git - ~andy/fetchmail/blob - pop3.c
Back to X-OTP.
[~andy/fetchmail] / pop3.c
1 /*
2  * pop3.c -- POP3 protocol methods
3  *
4  * Copyright 1998 by Eric S. Raymond.
5  * For license terms, see the file COPYING in this directory.
6  */
7
8 #include  "config.h"
9 #ifdef POP3_ENABLE
10 #include  <stdio.h>
11 #include  <string.h>
12 #include  <ctype.h>
13 #if defined(HAVE_UNISTD_H)
14 #include <unistd.h>
15 #endif
16 #if defined(STDC_HEADERS)
17 #include  <stdlib.h>
18 #endif
19  
20 #include  "fetchmail.h"
21 #include  "socket.h"
22 #include  "i18n.h"
23
24 #if OPIE_ENABLE
25 #include <opie.h>
26 #endif /* OPIE_ENABLE */
27
28 #ifndef strstr          /* glibc-2.1 declares this as a macro */
29 extern char *strstr();  /* needed on sysV68 R3V7.1. */
30 #endif /* strstr */
31
32 static int last;
33 #ifdef SDPS_ENABLE
34 char *sdps_envfrom;
35 char *sdps_envto;
36 #endif /* SDPS_ENABLE */
37
38 #if OPIE_ENABLE
39 static char lastok[POPBUFSIZE+1];
40 #endif /* OPIE_ENABLE */
41
42 #define DOTLINE(s)      (s[0] == '.' && (s[1]=='\r'||s[1]=='\n'||s[1]=='\0'))
43
44 int pop3_ok (int sock, char *argbuf)
45 /* parse command response */
46 {
47     int ok;
48     char buf [POPBUFSIZE+1];
49     char *bufp;
50
51     if ((ok = gen_recv(sock, buf, sizeof(buf))) == 0)
52     {
53         bufp = buf;
54         if (*bufp == '+' || *bufp == '-')
55             bufp++;
56         else
57             return(PS_PROTOCOL);
58
59         while (isalpha(*bufp))
60             bufp++;
61
62         if (*bufp)
63           *(bufp++) = '\0';
64
65         if (strcmp(buf,"+OK") == 0)
66         {
67 #if OPIE_ENABLE
68             strcpy(lastok, bufp);
69 #endif /* OPIE_ENABLE */
70             ok = 0;
71         }
72         else if (strncmp(buf,"-ERR", 4) == 0)
73         {
74             if (stage > STAGE_GETAUTH) 
75                 ok = PS_PROTOCOL;
76             /*
77              * We're checking for "lock busy", "unable to lock", 
78              * "already locked", "wait a few minutes" etc. here. 
79              * This indicates that we have to wait for the server to
80              * unwedge itself before we can poll again.
81              *
82              * PS_LOCKBUSY check empirically verified with two recent
83              * versions of the Berkeley popper; QPOP (version 2.2)  and
84              * QUALCOMM Pop server derived from UCB (version 2.1.4-R3)
85              * These are caught by the case-indifferent "lock" check.
86              * The "wait" catches "mail storage services unavailable,
87              * wait a few minutes and try again" on the InterMail server.
88              *
89              * If these aren't picked up on correctly, fetchmail will 
90              * think there is an authentication failure and wedge the
91              * connection in order to prevent futile polls.
92              *
93              * Gad, what a kluge.
94              */
95             else if (strstr(bufp,"lock")
96                      || strstr(bufp,"Lock")
97                      || strstr(bufp,"LOCK")
98                      || strstr(bufp,"wait")
99                      /* these are blessed by RFC 2449 */
100                      || strstr(bufp,"[IN-USE]")||strstr(bufp,"[LOGIN-DELAY]"))
101                 ok = PS_LOCKBUSY;
102             else
103                 ok = PS_AUTHFAIL;
104             if (*bufp)
105               report(stderr, "%s\n", bufp);
106         }
107         else
108             ok = PS_PROTOCOL;
109
110         if (argbuf != NULL)
111             strcpy(argbuf,bufp);
112     }
113
114     return(ok);
115 }
116
117 int pop3_getauth(int sock, struct query *ctl, char *greeting)
118 /* apply for connection authorization */
119 {
120     int ok;
121     char *start,*end;
122     char *msg;
123 #if OPIE_ENABLE
124     char *challenge;
125 #endif /* OPIE_ENABLE */
126
127 #ifdef SDPS_ENABLE
128     /*
129      * This needs to catch both demon.co.uk and demon.net.
130      * If we see either, and we're in multidrop mode, try to use
131      * the SDPS *ENV extension.
132      */
133     if (!(ctl->server.sdps) && MULTIDROP(ctl) && strstr(greeting, "demon."))
134         ctl->server.sdps = TRUE;
135 #endif /* SDPS_ENABLE */
136
137     /* 
138      * In theory, we ought to probe with CAPA here (RFC 2449).
139      * But AFAIK this commpand is not widely implemented, and
140      * we have our own tests for optional commands, and it seems
141      * vanishingly unlikely that the RFC 2449 extended responses
142      * [IN-USE] and [LOGIN-DELAY] will ever be accidentally spoofed.
143      * So we'll not bother, and save ourselves the overhead.
144      */
145
146     switch (ctl->server.protocol) {
147     case P_POP3:
148 #ifdef RPA_ENABLE
149         /* CompuServe POP3 Servers as of 990730 want AUTH first for RPA */
150         if (strstr(ctl->remotename, "@compuserve.com"))
151         {
152             /* AUTH command should return a list of available mechanisms */
153             if (gen_transact(sock, "AUTH") == 0)
154             {
155                 char buffer[10];
156                 flag has_rpa = FALSE;
157
158                 while ((ok = gen_recv(sock, buffer, sizeof(buffer))) == 0)
159                 {
160                     if (DOTLINE(buffer))
161                         break;
162                     if (strncasecmp(buffer, "rpa", 3) == 0)
163                         has_rpa = TRUE;
164                 }
165                 if (has_rpa && !POP3_auth_rpa(ctl->remotename, 
166                                               ctl->password, sock))
167                     return(PS_SUCCESS);
168             }
169
170             return(PS_AUTHFAIL);
171         }
172         else /* not a CompuServe account */
173 #endif /* RPA_ENABLE */
174             ok = gen_transact(sock, "USER %s", ctl->remotename);
175
176 #if OPIE_ENABLE
177         /* see RFC1938: A One-Time Password System */
178         if (challenge = strstr(lastok, "otp-")) {
179           char response[OPIE_RESPONSE_MAX+1];
180           int i;
181
182           i = opiegenerator(challenge, !strcmp(ctl->password, "opie") ? "" : ctl->password, response);
183           if ((i == -2) && !run.poll_interval) {
184             char secret[OPIE_SECRET_MAX+1];
185             fprintf(stderr, _("Secret pass phrase: "));
186             if (opiereadpass(secret, sizeof(secret), 0))
187               i = opiegenerator(challenge,  secret, response);
188             memset(secret, 0, sizeof(secret));
189           };
190
191           if (i) {
192             ok = PS_ERROR;
193             break;
194           };
195
196           ok = gen_transact(sock, "PASS %s", response);
197           break;
198         }
199 #endif /* OPIE_ENABLE */
200
201         /*
202          * AUTH command may return a list of available mechanisms.
203          * if it doesn't, no harm done.  Efficiency hack: most servers
204          * don't implement this, so don't do it at all unless the
205          * server advertises APOP with <> in the greeting line.  This
206          * certainly catches IMAP-2000's POP3 gateway.
207          * 
208          * These authentication methods are blessed by RFC1734,
209          * POP3 AUTHentication command.
210          */
211         if (strchr(greeting, '<') && gen_transact(sock, "AUTH") == 0)
212         {
213             char buffer[10];
214             flag has_cram = FALSE;
215 #if defined(KERBEROS_IV)
216             flag has_kerberos = FALSE;
217 #endif /* defined(KERBEROS_IV) */
218 #ifdef OPIE_ENABLE
219             flag has_opie = FALSE;
220 #endif /* OPIE_ENABLE */
221
222             while ((ok = gen_recv(sock, buffer, sizeof(buffer))) == 0)
223             {
224                 if (DOTLINE(buffer))
225                     break;
226                 if (strncasecmp(buffer, "CRAM-MD5", 8) == 0)
227                     has_cram = TRUE;
228 #if defined(KERBEROS_IV)
229                 if (strncasecmp(buffer, "KERBEROS_V4", 8) == 0)
230                     has_kerberos = TRUE;
231 #endif /* defined(KERBEROS_IV) */
232 #ifdef OPIE_ENABLE
233                 if (strncasecmp(buffer, "X-OTP", 8) == 0)
234                     has_opie = TRUE;
235 #endif /* OPIE_ENABLE */
236             }
237 #if defined(KERBEROS_IV)
238             if (has_kerberos)
239                 return(do_rfc1731(sock, "AUTH", ctl->server.truename));
240 #endif /* defined(KERBEROS_IV) */
241 #ifdef OPIE_ENABLE
242             if (has_opie)
243                 do_otp(sock, ctl)
244 #endif /* OPIE_ENABLE */
245             if (has_cram)
246                 return(do_cram_md5(sock, "AUTH", ctl));
247         }
248
249         /* ordinary validation, no one-time password or RPA */ 
250         ok = gen_transact(sock, "PASS %s", ctl->password);
251         break;
252
253     case P_APOP:
254         /* build MD5 digest from greeting timestamp + password */
255         /* find start of timestamp */
256         for (start = greeting;  *start != 0 && *start != '<';  start++)
257             continue;
258         if (*start == 0) {
259             report(stderr,
260                    _("Required APOP timestamp not found in greeting\n"));
261             return(PS_AUTHFAIL);
262         }
263
264         /* find end of timestamp */
265         for (end = start;  *end != 0  && *end != '>';  end++)
266             continue;
267         if (*end == 0 || end == start + 1) {
268             report(stderr, 
269                    _("Timestamp syntax error in greeting\n"));
270             return(PS_AUTHFAIL);
271         }
272         else
273             *++end = '\0';
274
275         /* copy timestamp and password into digestion buffer */
276         xalloca(msg, char *, (end-start+1) + strlen(ctl->password) + 1);
277         strcpy(msg,start);
278         strcat(msg,ctl->password);
279
280         strcpy(ctl->digest, MD5Digest((unsigned char *)msg));
281
282         ok = gen_transact(sock, "APOP %s %s", ctl->remotename, ctl->digest);
283         break;
284
285     case P_RPOP:
286         if ((ok = gen_transact(sock,"USER %s", ctl->remotename)) == 0)
287             ok = gen_transact(sock, "RPOP %s", ctl->password);
288         break;
289
290     default:
291         report(stderr, _("Undefined protocol request in POP3_auth\n"));
292         ok = PS_ERROR;
293     }
294
295     if (ok != 0)
296     {
297         /* maybe we detected a lock-busy condition? */
298         if (ok == PS_LOCKBUSY)
299             report(stderr, _("lock busy!  Is another session active?\n")); 
300
301         return(ok);
302     }
303
304     /*
305      * Empirical experience shows some server/OS combinations
306      * may need a brief pause even after any lockfiles on the
307      * server are released, to give the server time to finish
308      * copying back very large mailfolders from the temp-file...
309      * this is only ever an issue with extremely large mailboxes.
310      */
311     sleep(3); /* to be _really_ safe, probably need sleep(5)! */
312
313     /* we're peek-capable if use of TOP is enabled */
314     peek_capable = !(ctl->fetchall || ctl->keep);
315
316     /* we're approved */
317     return(PS_SUCCESS);
318 }
319
320 static int
321 pop3_gettopid( int sock, int num , char *id)
322 {
323     int ok;
324     int got_it;
325     char buf [POPBUFSIZE+1];
326     sprintf( buf, "TOP %d 1", num );
327     if ((ok = gen_transact(sock, buf )) != 0)
328        return ok; 
329     got_it = 0;
330     while ((ok = gen_recv(sock, buf, sizeof(buf))) == 0) 
331     {
332         if (DOTLINE(buf))
333             break;
334         if ( ! got_it && ! strncasecmp("Message-Id:", buf, 11 )) {
335             got_it = 1;
336             /* prevent stack overflows */
337             buf[IDLEN+12] = 0;
338             sscanf( buf+12, "%s", id);
339         }
340     }
341     return 0;
342 }
343
344 static int
345 pop3_slowuidl( int sock,  struct query *ctl, int *countp, int *newp)
346 {
347     /* This approach tries to get the message headers from the
348      * remote hosts and compares the message-id to the already known
349      * ones:
350      *  + if the first message containes a new id, all messages on
351      *    the server will be new
352      *  + if the first is known, try to estimate the last known message
353      *    on the server and check. If this works you know the total number
354      *    of messages to get.
355      *  + Otherwise run a binary search to determine the last known message
356      */
357     int ok, nolinear = 0;
358     int first_nr, list_len, try_id, try_nr, add_id;
359     int num;
360     char id [IDLEN+1];
361     
362     if( (ok = pop3_gettopid( sock, 1, id )) != 0 )
363         return ok;
364     
365     if( ( first_nr = str_nr_in_list(&ctl->oldsaved, id) ) == -1 ) {
366         /* the first message is unknown -> all messages are new */
367         *newp = *countp;        
368         return 0;
369     }
370
371     /* check where we expect the latest known message */
372     list_len = count_list( &ctl->oldsaved );
373     try_id = list_len  - first_nr; /* -1 + 1 */
374     if( try_id > 1 ) {
375         if( try_id <= *countp ) {
376             if( (ok = pop3_gettopid( sock, try_id, id )) != 0 )
377                 return ok;
378     
379             try_nr = str_nr_last_in_list(&ctl->oldsaved, id);
380         } else {
381             try_id = *countp+1;
382             try_nr = -1;
383         }
384         if( try_nr != list_len -1 ) {
385             /* some messages inbetween have been deleted... */
386             if( try_nr == -1 ) {
387                 nolinear = 1;
388
389                 for( add_id = 1<<30; add_id > try_id-1; add_id >>= 1 )
390                     ;
391                 for( ; add_id; add_id >>= 1 ) {
392                     if( try_nr == -1 ) {
393                         if( try_id - add_id <= 1 ) {
394                             continue;
395                         }
396                         try_id -= add_id;
397                     } else 
398                         try_id += add_id;
399                     
400                     if( (ok = pop3_gettopid( sock, try_id, id )) != 0 )
401                         return ok;
402                     try_nr = str_nr_in_list(&ctl->oldsaved, id);
403                 }
404                 if( try_nr == -1 ) {
405                     try_id--;
406                 }
407             } else {
408                 report(stderr, 
409                        _("Messages inserted into list on server. Cannot handle this.\n"));
410                 return -1;
411             }
412         } 
413     }
414     /* the first try_id messages are known -> copy them to the newsaved list */
415     for( num = first_nr; num < list_len; num++ )
416     {
417         struct idlist   *new = save_str(&ctl->newsaved, 
418                                 str_from_nr_list(&ctl->oldsaved, num),
419                                 UID_UNSEEN);
420         new->val.status.num = num - first_nr + 1;
421     }
422
423     if( nolinear ) {
424         free_str_list(&ctl->oldsaved);
425         ctl->oldsaved = 0;
426         last = try_id;
427     }
428
429     *newp = *countp - try_id;
430     return 0;
431 }
432
433 static int pop3_getrange(int sock, 
434                          struct query *ctl,
435                          const char *folder,
436                          int *countp, int *newp, int *bytes)
437 /* get range of messages to be fetched */
438 {
439     int ok;
440     char buf [POPBUFSIZE+1];
441
442     /* Ensure that the new list is properly empty */
443     ctl->newsaved = (struct idlist *)NULL;
444
445 #ifdef MBOX
446     /* Alain Knaff suggests this, but it's not RFC standard */
447     if (folder)
448         if ((ok = gen_transact(sock, "MBOX %s", folder)))
449             return ok;
450 #endif /* MBOX */
451
452     /* get the total message count */
453     gen_send(sock, "STAT");
454     ok = pop3_ok(sock, buf);
455     if (ok == 0)
456         sscanf(buf,"%d %d", countp, bytes);
457     else
458         return(ok);
459
460     /*
461      * Newer, RFC-1725-conformant POP servers may not have the LAST command.
462      * We work as hard as possible to hide this ugliness, but it makes 
463      * counting new messages intrinsically quadratic in the worst case.
464      */
465     last = 0;
466     *newp = -1;
467     if (*countp > 0 && !ctl->fetchall)
468     {
469         char id [IDLEN+1];
470
471         if (!ctl->server.uidl) {
472             gen_send(sock, "LAST");
473             ok = pop3_ok(sock, buf);
474         } else
475             ok = 1;
476         if (ok == 0)
477         {
478             if (sscanf(buf, "%d", &last) == 0)
479             {
480                 report(stderr, _("protocol error\n"));
481                 return(PS_ERROR);
482             }
483             *newp = (*countp - last);
484         }
485         else
486         {
487             /* grab the mailbox's UID list */
488             if ((ok = gen_transact(sock, "UIDL")) != 0)
489             {
490                 /* don't worry, yet! do it the slow way */
491                 if((ok = pop3_slowuidl( sock, ctl, countp, newp))!=0)
492                 {
493                     report(stderr, _("protocol error while fetching UIDLs\n"));
494                     return(PS_ERROR);
495                 }
496             }
497             else
498             {
499                 int     num;
500
501                 *newp = 0;
502                 while ((ok = gen_recv(sock, buf, sizeof(buf))) == 0)
503                 {
504                     if (DOTLINE(buf))
505                         break;
506                     else if (sscanf(buf, "%d %s", &num, id) == 2)
507                     {
508                         struct idlist   *new;
509
510                         new = save_str(&ctl->newsaved, id, UID_UNSEEN);
511                         new->val.status.num = num;
512
513                         if (str_in_list(&ctl->oldsaved, id, FALSE)) {
514                             new->val.status.mark = UID_SEEN;
515                             str_set_mark(&ctl->oldsaved, id, UID_SEEN);
516                         }
517                         else
518                             (*newp)++;
519                     }
520                 }
521             }
522         }
523     }
524
525     return(PS_SUCCESS);
526 }
527
528 static int pop3_getsizes(int sock, int count, int *sizes)
529 /* capture the sizes of all messages */
530 {
531     int ok;
532
533     if ((ok = gen_transact(sock, "LIST")) != 0)
534         return(ok);
535     else
536     {
537         char buf [POPBUFSIZE+1];
538
539         while ((ok = gen_recv(sock, buf, sizeof(buf))) == 0)
540         {
541             int num, size;
542
543             if (DOTLINE(buf))
544                 break;
545             else if (sscanf(buf, "%d %d", &num, &size) == 2)
546                 sizes[num - 1] = size;
547         }
548
549         return(ok);
550     }
551 }
552
553 static int pop3_is_old(int sock, struct query *ctl, int num)
554 /* is the given message old? */
555 {
556     if (!ctl->oldsaved)
557         return (num <= last);
558     else
559         return (str_in_list(&ctl->oldsaved,
560                             str_find(&ctl->newsaved, num), FALSE));
561 }
562
563 #ifdef UNUSED
564 /*
565  * We could use this to fetch headers only as we do for IMAP.  The trouble 
566  * is that there's no way to fetch the body only.  So the following RETR 
567  * would have to re-fetch the header.  Enough messages have longer headers
568  * than bodies to make this a net loss.
569  */
570 static int pop_fetch_headers(int sock, struct query *ctl,int number,int *lenp)
571 /* request headers of nth message */
572 {
573     int ok;
574     char buf[POPBUFSIZE+1];
575
576     gen_send(sock, "TOP %d 0", number);
577     if ((ok = pop3_ok(sock, buf)) != 0)
578         return(ok);
579
580     *lenp = -1;         /* we got sizes from the LIST response */
581
582     return(PS_SUCCESS);
583 }
584 #endif /* UNUSED */
585
586 static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp)
587 /* request nth message */
588 {
589     int ok;
590     char buf[POPBUFSIZE+1];
591
592 #ifdef SDPS_ENABLE
593     /*
594      * See http://www.demon.net/services/mail/sdps-tech.html
595      * for a description of what we're parsing here.
596      */
597     if (ctl->server.sdps)
598     {
599         int     linecount = 0;
600
601         sdps_envfrom = (char *)NULL;
602         sdps_envto = (char *)NULL;
603         gen_send(sock, "*ENV %d", number);
604         do {
605             if (gen_recv(sock, buf, sizeof(buf)))
606             {
607                 break;
608             }
609             linecount++;
610             switch (linecount) {
611             case 4:
612                 /* No need to wrap envelope from address */
613                 sdps_envfrom = xmalloc(strlen(buf)+1);
614                 strcpy(sdps_envfrom,buf);
615                 break;
616             case 5:
617                 /* Wrap address with To: <> so nxtaddr() likes it */
618                 sdps_envto = xmalloc(strlen(buf)+7);
619                 sprintf(sdps_envto,"To: <%s>",buf);
620                 break;
621             }
622         } while
623             (!(buf[0] == '.' && (buf[1] == '\r' || buf[1] == '\n' || buf[1] == '\0')));
624     }
625 #endif /* SDPS_ENABLE */
626
627     /*
628      * Though the POP RFCs don't document this fact, on almost every
629      * POP3 server I know of messages are marked "seen" only at the
630      * time the OK response to a RETR is issued.
631      *
632      * This means we can use TOP to fetch the message without setting its
633      * seen flag.  This is good!  It means that if the protocol exchange
634      * craps out during the message, it will still be marked `unseen' on
635      * the server.  (Exception: in early 1999 SpryNet's POP3 servers were
636      * reported to mark messages seen on a TOP fetch.)
637      *
638      * However...*don't* do this if we're using keep to suppress deletion!
639      * In that case, marking the seen flag is the only way to prevent the
640      * message from being re-fetched on subsequent runs.
641      *
642      * Also use RETR if fetchall is on.  This gives us a workaround
643      * for servers like usa.net's that bungle TOP.  It's pretty
644      * harmless because fetchall guarantees that any message dropped
645      * by an interrupted RETR will be picked up on the next poll of the
646      * site.
647      *
648      * We take advantage here of the fact that, according to all the
649      * POP RFCs, "if the number of lines requested by the POP3 client
650      * is greater than than the number of lines in the body, then the
651      * POP3 server sends the entire message.").
652      *
653      * The line count passed (99999999) is the maximum value CompuServe will
654      * accept; it's much lower than the natural value 2147483646 (the maximum
655      * twos-complement signed 32-bit integer minus 1) */
656     if (ctl->keep || ctl->fetchall)
657         gen_send(sock, "RETR %d", number);
658     else
659         gen_send(sock, "TOP %d 99999999", number);
660     if ((ok = pop3_ok(sock, buf)) != 0)
661         return(ok);
662
663     *lenp = -1;         /* we got sizes from the LIST response */
664
665     return(PS_SUCCESS);
666 }
667
668 static int pop3_delete(int sock, struct query *ctl, int number)
669 /* delete a given message */
670 {
671     /* actually, mark for deletion -- doesn't happen until QUIT time */
672     return(gen_transact(sock, "DELE %d", number));
673 }
674
675 static int pop3_logout(int sock, struct query *ctl)
676 /* send logout command */
677 {
678     int ok;
679
680     ok = gen_transact(sock, "QUIT");
681     if (!ok)
682         expunge_uids(ctl);
683
684     if (ctl->lastid)
685     {
686         free(ctl->lastid);
687         ctl->lastid = NULL;
688     }
689
690     return(ok);
691 }
692
693 const static struct method pop3 =
694 {
695     "POP3",             /* Post Office Protocol v3 */
696 #if INET6_ENABLE
697     "pop3",             /* standard POP3 port */
698     "pop3s",            /* ssl POP3 port */
699 #else /* INET6_ENABLE */
700     110,                /* standard POP3 port */
701     995,                /* ssl POP3 port */
702 #endif /* INET6_ENABLE */
703     FALSE,              /* this is not a tagged protocol */
704     TRUE,               /* this uses a message delimiter */
705     pop3_ok,            /* parse command response */
706     NULL,               /* no password canonicalization */
707     pop3_getauth,       /* get authorization */
708     pop3_getrange,      /* query range of messages */
709     pop3_getsizes,      /* we can get a list of sizes */
710     pop3_is_old,        /* how do we tell a message is old? */
711     pop3_fetch,         /* request given message */
712     NULL,               /* no way to fetch body alone */
713     NULL,               /* no message trailer */
714     pop3_delete,        /* how to delete a message */
715     pop3_logout,        /* log out, we're done */
716     FALSE,              /* no, we can't re-poll */
717 };
718
719 int doPOP3 (struct query *ctl)
720 /* retrieve messages using POP3 */
721 {
722 #ifndef MBOX
723     if (ctl->mailboxes->id) {
724         fprintf(stderr,_("Option --remote is not supported with POP3\n"));
725         return(PS_SYNTAX);
726     }
727 #endif /* MBOX */
728     peek_capable = !ctl->fetchall;
729     return(do_protocol(ctl, &pop3));
730 }
731 #endif /* POP3_ENABLE */
732
733 /* pop3.c ends here */