From 0f19cf5f3f3ee4637609c61d0ac2b862d82204ad Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 18 Oct 2002 15:29:05 +0000 Subject: Sunil Shetye's header-read fix. svn path=/trunk/; revision=3746 --- driver.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3