aboutsummaryrefslogtreecommitdiffstats
path: root/pop3.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2004-08-09 02:49:03 +0000
committerMatthias Andree <matthias.andree@gmx.de>2004-08-09 02:49:03 +0000
commit62b873a4c989f0df580e9deea7245affc130fa10 (patch)
tree917c64bd4f5186b90e78ad0427f43e9665fac7b2 /pop3.c
parent135a339b612865e128580affeadb84f5859bf89e (diff)
downloadfetchmail-62b873a4c989f0df580e9deea7245affc130fa10.tar.gz
fetchmail-62b873a4c989f0df580e9deea7245affc130fa10.tar.bz2
fetchmail-62b873a4c989f0df580e9deea7245affc130fa10.zip
Do not disable TOP in 'keep, but not uidl' mode.
Patch by Jakob Hirsch, 2003-05-22, revised by Matthias Andree, 2004-08-08. svn path=/trunk/; revision=3927
Diffstat (limited to 'pop3.c')
-rw-r--r--pop3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pop3.c b/pop3.c
index 230244d6..ee2b9d40 100644
--- a/pop3.c
+++ b/pop3.c
@@ -589,7 +589,7 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting)
sleep(3); /* to be _really_ safe, probably need sleep(5)! */
/* we're peek-capable if use of TOP is enabled */
- peek_capable = !(ctl->fetchall || ctl->keep);
+ peek_capable = !(ctl->fetchall || (ctl->keep && !ctl->server.uidl));
/* we're approved */
return(PS_SUCCESS);
@@ -1102,7 +1102,7 @@ static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp)
* The line count passed (99999999) is the maximum value CompuServe will
* accept; it's much lower than the natural value 2147483646 (the maximum
* twos-complement signed 32-bit integer minus 1) */
- if (ctl->keep || ctl->fetchall)
+ if (!peek_capable)
gen_send(sock, "RETR %d", number);
else
gen_send(sock, "TOP %d 99999999", number);