# seems to think they are FETCH replies and gives user "Message no longer
# in server" error. Note that OE6 still breaks even with this workaround
# if synchronization is set to "Headers Only".
+# oe6-fetch-redundant-msgset:
+# If client requests "nextuid:*" messageset, don't return the last message
+# as RFC3501 would require. This may considerably improve Dovecot's caching
+# decisions for OE6 users.
# outlook-idle:
# Outlook and Outlook Express never abort IDLE command, so if no mail
# arrives in half a hour, Dovecot closes the connection. This is still
return FALSE;
}
+ if ((client_workarounds & WORKAROUND_OE6_FETCH_REDUNDANT_MSGSET) != 0 &&
+ ctx->uidset && ctx->num1 == ctx->ibox->index->header->next_uid &&
+ ctx->num2 == (unsigned int)-1) {
+ /* FETCH nextuid:* - it's very unlikely the client wants to
+ fetch the last message */
+ ctx->num2 = ctx->num1;
+ }
+
if (ctx->num1 > ctx->num2) {
/* swap, as specified by RFC-3501 */
unsigned int temp = ctx->num1;
struct client_workaround_list client_workaround_list[] = {
{ "oe6-fetch-no-newmail", WORKAROUND_OE6_FETCH_NO_NEWMAIL },
+ { "oe6-fetch-redundant-msgset", WORKAROUND_OE6_FETCH_REDUNDANT_MSGSET },
{ "outlook-idle", WORKAROUND_OUTLOOK_IDLE },
{ NULL, 0 }
};
};
enum client_workarounds {
- WORKAROUND_OE6_FETCH_NO_NEWMAIL = 0x01,
- WORKAROUND_OUTLOOK_IDLE = 0x02
+ WORKAROUND_OE6_FETCH_NO_NEWMAIL = 0x01,
+ WORKAROUND_OE6_FETCH_REDUNDANT_MSGSET = 0x02,
+ WORKAROUND_OUTLOOK_IDLE = 0x04
};
struct mail_storage;