]> Pileus Git - ~andy/fetchmail/blobdiff - imap.c
Attempt merging from 6.3.24.
[~andy/fetchmail] / imap.c
diff --git a/imap.c b/imap.c
index a181b1dbaf4da4916b11ba75356a2528497fc450..65d225381b7c1b926c5d38d1e8312dbaf67c6ee2 100644 (file)
--- a/imap.c
+++ b/imap.c
@@ -1130,7 +1130,8 @@ static int imap_fetch_headers(int sock, struct query *ctl,int number,int *lenp)
 
        /* try to recover for some responses */
        if (!strncmp(buf, "* NO", 4) ||
-               !strncmp(buf, "* BAD", 5))
+               !strncmp(buf, "* BAD", 5) ||
+               strstr(buf, "FETCH ()"))
        {
            return(PS_TRANSIENT);
        }
@@ -1145,7 +1146,7 @@ static int imap_fetch_headers(int sock, struct query *ctl,int number,int *lenp)
        /* an unexpected tagged response */
        if (outlevel > O_SILENT)
            report(stderr, GT_("Incorrect FETCH response: %s.\n"), buf);
-       return(PS_ERROR);
+       return(PS_TRANSIENT);
     }
     return(ok);
 }