aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2002-10-18 15:29:05 +0000
committerEric S. Raymond <esr@thyrsus.com>2002-10-18 15:29:05 +0000
commit0f19cf5f3f3ee4637609c61d0ac2b862d82204ad (patch)
treebc19ce1adf1b4ce03a0c8fce90807570efead6c7
parenta63e7031d34003daa4ccf308d8406fb0d9eeca3b (diff)
downloadfetchmail-0f19cf5f3f3ee4637609c61d0ac2b862d82204ad.tar.gz
fetchmail-0f19cf5f3f3ee4637609c61d0ac2b862d82204ad.tar.bz2
fetchmail-0f19cf5f3f3ee4637609c61d0ac2b862d82204ad.zip
Sunil Shetye's header-read fix.
svn path=/trunk/; revision=3746
-rw-r--r--driver.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/driver.c b/driver.c
index 563a68ba..b1fa4bf4 100644
--- a/driver.c
+++ b/driver.c
@@ -493,11 +493,25 @@ static int fetch_messages(int mailserver_socket, struct query *ctl,
err = readheaders(mailserver_socket, len, msgsizes[num-1],
ctl, num);
if (err == PS_RETAINED)
- suppress_readbody = suppress_forward = suppress_delete = retained = TRUE;
+ {
+ suppress_forward = suppress_delete = retained = TRUE;
+ /* do not read the body only if the underlying protocol
+ * allows the body to be fetched separately */
+ if (ctl->server.base_protocol->fetch_body)
+ suppress_readbody = TRUE;
+ }
else if (err == PS_TRANSIENT)
+ {
suppress_delete = suppress_forward = TRUE;
+ if (ctl->server.base_protocol->fetch_body)
+ suppress_readbody = TRUE;
+ }
else if (err == PS_REFUSED)
+ {
suppress_forward = TRUE;
+ if (ctl->server.base_protocol->fetch_body)
+ suppress_readbody = TRUE;
+ }
#if 0
/*
* readheaders does not read the body when it