From f4a192f375c47bc910f7b6216aa270855012d0a2 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 25 Jan 2014 11:34:03 +0100 Subject: [PATCH] don't error out if we don't get an X-TUID header the BODY[] item in the FETCH response corresponds to what we requested, and its presence doesn't imply that it actually contains anything useful - new messages may appear in the mailbox in addition to those we stored ourselves, and these will obviously have no TUID. --- src/drv_imap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drv_imap.c b/src/drv_imap.c index 5a28392..6007e54 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -922,9 +922,10 @@ parse_fetch_rsp( imap_store_t *ctx, list_t *list, char *s ATTR_UNUSED ) if (!is_atom( tmp ) || strcmp( tmp->val, "]" )) goto bfail; tmp = tmp->next; - if (!is_atom( tmp ) || memcmp( tmp->val, "X-TUID: ", 8 )) + if (!is_atom( tmp )) goto bfail; - tuid = tmp->val + 8; + if (!memcmp( tmp->val, "X-TUID: ", 8 )) + tuid = tmp->val + 8; } else { bfail: error( "IMAP error: unable to parse BODY[HEADER.FIELDS ...]\n" );