- if (notmuch_config_get_auto_exclude_tags (config, &tmp) == NULL) {
- const char *tags[] = { "deleted", "spam" };
- notmuch_config_set_auto_exclude_tags (config, tags, 2);
+ if (notmuch_config_get_search_exclude_tags (config, &tmp) == NULL) {
+ if (is_new) {
+ const char *tags[] = { "deleted", "spam" };
+ notmuch_config_set_search_exclude_tags (config, tags, 2);
+ } else {
+ notmuch_config_set_search_exclude_tags (config, NULL, 0);
+ }