diff --git a/src/config.c b/src/config.c index 3e0db0b..dec47b2 100644 --- a/src/config.c +++ b/src/config.c @@ -425,7 +425,8 @@ load_config( const char *where ) if (*++p) channel->boxes[fn] = nfstrdup( p ); } else if (!getopt_helper( &cfile, &cops, channel )) { - error( "%s:%d: unknown keyword '%s'\n", cfile.file, cfile.line, cfile.cmd ); + error( "%s:%d: keyword '%s' is not recognized in Channel sections\n", + cfile.file, cfile.line, cfile.cmd ); cfile.err = 1; } } @@ -476,7 +477,7 @@ load_config( const char *where ) } else { - error( "%s:%d: unknown keyword '%s'\n", + error( "%s:%d: keyword '%s' is not recognized in Group sections\n", cfile.file, cfile.line, cfile.cmd ); cfile.err = 1; } @@ -511,7 +512,7 @@ load_config( const char *where ) } else if (!getopt_helper( &cfile, &gcops, &global_conf )) { - error( "%s:%d: unknown section keyword '%s'\n", + error( "%s:%d: '%s' is not a recognized section-starting or global keyword\n", cfile.file, cfile.line, cfile.cmd ); cfile.err = 1; while (getcline( &cfile )) diff --git a/src/driver.c b/src/driver.c index b86c117..291ee0b 100644 --- a/src/driver.c +++ b/src/driver.c @@ -49,7 +49,7 @@ free_generic_messages( message_t *msgs ) } void -parse_generic_store( store_conf_t *store, conffile_t *cfg ) +parse_generic_store( store_conf_t *store, conffile_t *cfg, const char *type ) { if (!strcasecmp( "Trash", cfg->cmd )) { store->trash = nfstrdup( cfg->val ); @@ -72,7 +72,7 @@ parse_generic_store( store_conf_t *store, conffile_t *cfg ) } store->flat_delim = nfstrdup( cfg->val ); } else { - error( "%s:%d: unknown keyword '%s'\n", cfg->file, cfg->line, cfg->cmd ); + error( "%s:%d: keyword '%s' is not recognized in %s sections\n", cfg->file, cfg->line, cfg->cmd, type ); cfg->err = 1; } } diff --git a/src/driver.h b/src/driver.h index 8aeba48..21760f5 100644 --- a/src/driver.h +++ b/src/driver.h @@ -276,7 +276,7 @@ struct driver { uint count_generic_messages( message_t * ); void free_generic_messages( message_t * ); -void parse_generic_store( store_conf_t *store, conffile_t *cfg ); +void parse_generic_store( store_conf_t *store, conffile_t *cfg, const char *type ); store_t *proxy_alloc_store( store_t *real_ctx, const char *label ); diff --git a/src/drv_imap.c b/src/drv_imap.c index 6e084d5..f628eb3 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -3529,10 +3529,11 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) } store->delimiter = cfg->val[0]; } else - parse_generic_store( &store->gen, cfg ); + parse_generic_store( &store->gen, cfg, "IMAPStore" ); continue; } else { - error( "%s:%d: unknown/misplaced keyword '%s'\n", cfg->file, cfg->line, cfg->cmd ); + error( "%s:%d: keyword '%s' is not recognized in IMAPAccount sections\n", + cfg->file, cfg->line, cfg->cmd ); cfg->err = 1; continue; } diff --git a/src/drv_maildir.c b/src/drv_maildir.c index 0cb796a..a836408 100644 --- a/src/drv_maildir.c +++ b/src/drv_maildir.c @@ -1913,7 +1913,7 @@ maildir_parse_store( conffile_t *cfg, store_conf_t **storep ) cfg->err = 1; } } else - parse_generic_store( &store->gen, cfg ); + parse_generic_store( &store->gen, cfg, "MaildirStore" ); if (!store->inbox) store->inbox = expand_strdup( "~/Maildir" ); if (store->sub_style == SUB_MAILDIRPP && store->gen.path) {