aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2002-10-18 15:30:43 +0000
committerEric S. Raymond <esr@thyrsus.com>2002-10-18 15:30:43 +0000
commit9f3c51765503431fd25174dbb946c3cac7bbbdf1 (patch)
tree9141af7b3253cb3e87b8497f5e331198e52a5bf9
parentabf69ae34b26c1151f18f3f720e08e53e4b8a703 (diff)
downloadfetchmail-9f3c51765503431fd25174dbb946c3cac7bbbdf1.tar.gz
fetchmail-9f3c51765503431fd25174dbb946c3cac7bbbdf1.tar.bz2
fetchmail-9f3c51765503431fd25174dbb946c3cac7bbbdf1.zip
Another Shetye fix.
svn path=/trunk/; revision=3749
-rw-r--r--transact.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/transact.c b/transact.c
index 82729aa6..dbf55f53 100644
--- a/transact.c
+++ b/transact.c
@@ -371,6 +371,7 @@ int readheaders(int sock,
flag no_local_matches = FALSE;
flag headers_ok, has_nuls;
int olderrs, good_addresses, bad_addresses;
+ int retain_mail = 0;
sizeticker = 0;
has_nuls = headers_ok = FALSE;
@@ -559,9 +560,8 @@ int readheaders(int sock,
#endif /* POP2_ENABLE */
if (num == 1 && !strncasecmp(line, "X-IMAP:", 7)) {
free(line);
- free(msgblk.headers);
- msgblk.headers = NULL;
- return(PS_RETAINED);
+ retain_mail = 1;
+ continue;
}
/*
@@ -799,6 +799,13 @@ int readheaders(int sock,
}
process_headers:
+
+ if (retain_mail)
+ {
+ free(msgblk.headers);
+ msgblk.headers = NULL;
+ return(PS_RETAINED);
+ }
/*
* When mail delivered to a multidrop mailbox on the server is
* addressed to multiple people on the client machine, there will