[PATCH] imapc: Accept strings in FLAGS responses
Richard Laager
rlaager at wiktel.com
Tue Mar 8 05:41:02 UTC 2016
While non-standard, the IMAP server we are replacing returns non-system
flags as strings instead of atoms.
Prior to this change, imapc would abort processing on the first message
with a string flag.
---
src/lib-storage/index/imapc/imapc-mailbox.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib-storage/index/imapc/imapc-mailbox.c b/src/lib-storage/index/imapc/imapc-mailbox.c
index c3e12d1..91333dc 100644
--- a/src/lib-storage/index/imapc/imapc-mailbox.c
+++ b/src/lib-storage/index/imapc/imapc-mailbox.c
@@ -310,7 +310,8 @@ static void imapc_untagged_fetch(const struct imapc_untagged_reply *reply,
t_array_init(&keywords, 8);
seen_flags = TRUE;
for (j = 0; flags_list[j].type != IMAP_ARG_EOL; j++) {
- if (!imap_arg_get_atom(&flags_list[j], &atom))
+ if (!imap_arg_get_atom(&flags_list[j], &atom) &&
+ !imap_arg_get_string(&flags_list[j], &atom))
return;
if (atom[0] == '\\')
flags |= imap_parse_system_flag(atom);
--
2.1.4
More information about the dovecot
mailing list