]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imapc: Handle missing INTERNALDATE reply by returning an empty mail instead of discon...
authorTimo Sirainen <tss@iki.fi>
Wed, 14 Dec 2011 10:33:59 +0000 (12:33 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 14 Dec 2011 10:33:59 +0000 (12:33 +0200)
src/lib-storage/index/imapc/imapc-mail.c

index 1fb6003cfaafcffdc6bb7920c0aa3cf420e01648..d2184db022cd852a4b9c032ebffa0b71099a547a 100644 (file)
@@ -79,7 +79,9 @@ static int imapc_mail_get_received_date(struct mail *_mail, time_t *date_r)
                        return -1;
                if (data->received_date == (time_t)-1) {
                        imapc_mail_failed(_mail, "INTERNALDATE");
-                       return -1;
+                       /* assume that the server never returns INTERNALDATE
+                          for this mail (see BODY[] failure handling) */
+                       data->received_date = 0;
                }
        }
        *date_r = data->received_date;