aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-12-10 13:47:13 +0100
committerMatthias Andree <matthias.andree@gmx.de>2010-12-10 13:47:13 +0100
commit5a52b46d72abea688eda72c403634ec95046db40 (patch)
tree78eec43bd80d780183417061da69c3cc155f5760
parent6684279dc573f5ac4e9b30a53c7f1aecc7940160 (diff)
downloadfetchmail-5a52b46d72abea688eda72c403634ec95046db40.tar.gz
fetchmail-5a52b46d72abea688eda72c403634ec95046db40.tar.bz2
fetchmail-5a52b46d72abea688eda72c403634ec95046db40.zip
Hack: support quoted string in imap_fetch_body()
This is seen on Yahoo in * 123 FETCH (BODY[TEXT] ""), reported by Yasin Malli.
-rw-r--r--NEWS3
-rw-r--r--imap.c7
2 files changed, 10 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index db7a5393..62481fb5 100644
--- a/NEWS
+++ b/NEWS
@@ -81,6 +81,9 @@ fetchmail-6.3.19 (not yet released):
* Do STARTTLS/STLS negotiation in IMAP/POP3 if it is mandatory even if the
server capabilities do not show support for upgradation to TLS.
To use this, configure --sslproto tls1. (Sunil Shetye)
+* IMAP: Understand empty strings as FETCH response, seen on Yahoo. Reported by
+ Yasin Malli to fetchmail-users@ 2010-12-10.
+ Note that fetchmail continues to expect literals as FETCH response for now.
# DOCUMENTATION
* The manual page now links to IANA for GSSAPI service names.
diff --git a/imap.c b/imap.c
index 11b206c0..1364027f 100644
--- a/imap.c
+++ b/imap.c
@@ -1264,6 +1264,13 @@ static int imap_fetch_body(int sock, struct query *ctl, int number, int *lenp)
return PS_SUCCESS;
}
+ /* Understand the empty string. Seen on Yahoo. */
+ /* XXX FIXME: we should be able to handle strings here. */
+ if (strstr(buf+10, "\"\")")) {
+ *lenp = 0;
+ return PS_SUCCESS;
+ }
+
/*
* Try to extract a length from the FETCH response. RFC2060 requires
* it to be present, but at least one IMAP server (Novell GroupWise)