Browse Source

*** workaround pointless "Keyword not supported" warnings from exchange

*** this is is an *untested* rebase; originally submitted against 1.3

patch by Florian Lombard <f.lombard@montmirail.com>:

============

> i wonder why a server would bleat about not supporting an optional
> feature when it can (and probably does) announce that in a "civilized"
> way, too. did these responses appear to be correlated with specific
> messages, or did they always come when opening any mailbox?

Well, "exchange online", that sums it all ...
Tied to specific messages, I guess it happened when there was a word
between bracket in the message subject (no debug log of that).
Happends only one time, when the message is synced.
wip/exchange-workarounds-1.5
Oswald Buddenhagen 8 years ago
parent
commit
fe42f1d04f
  1. 6
      src/drv_imap.c

6
src/drv_imap.c

@ -55,6 +55,7 @@ typedef union imap_store_conf {
char delimiter; char delimiter;
char use_namespace; char use_namespace;
char use_lsub; char use_lsub;
char ignore_keyword_warnings;
}; };
} imap_store_conf_t; } imap_store_conf_t;
@ -1808,7 +1809,8 @@ imap_socket_read( void *aux )
error( "IMAP error: bogus greeting response %s\n", arg ); error( "IMAP error: bogus greeting response %s\n", arg );
break; break;
} else if (equals( arg, argl, "NO", 2 )) { } else if (equals( arg, argl, "NO", 2 )) {
warn( "Warning from IMAP server: %s\n", cmd ); if (!ctx->conf->ignore_keyword_warnings || strcmp( cmd, "Keywords are not supported" ))
warn( "Warning from IMAP server: %s\n", cmd );
} else if (equals( arg, argl, "BAD", 3 )) { } else if (equals( arg, argl, "BAD", 3 )) {
error( "Error from IMAP server: %s\n", cmd ); error( "Error from IMAP server: %s\n", cmd );
} else if (equals( arg, argl, "CAPABILITY", 10 )) { } else if (equals( arg, argl, "CAPABILITY", 10 )) {
@ -3962,6 +3964,8 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep )
store->use_namespace = parse_bool( cfg ); store->use_namespace = parse_bool( cfg );
} else if (!strcasecmp( "SubscribedOnly", cfg->cmd )) { } else if (!strcasecmp( "SubscribedOnly", cfg->cmd )) {
store->use_lsub = parse_bool( cfg ); store->use_lsub = parse_bool( cfg );
} else if (!strcasecmp( "IgnoreKeywordWarnings", cfg->cmd )) {
store->ignore_keyword_warnings = parse_bool( cfg );
} else if (!strcasecmp( "Path", cfg->cmd )) { } else if (!strcasecmp( "Path", cfg->cmd )) {
store->path = nfstrdup( cfg->val ); store->path = nfstrdup( cfg->val );
} else if (!strcasecmp( "PathDelimiter", cfg->cmd )) { } else if (!strcasecmp( "PathDelimiter", cfg->cmd )) {

Loading…
Cancel
Save