From 998e8e43701e080f3ef9d6849715e9a6f1616255 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 2 Aug 2013 20:10:43 -0400 Subject: [PATCH] Instant expunge is now the only mode of operation. The expunge semantics have been stupid from the beginning and Mark Crispin should die in a car fire for forcing the entire world to deal with workarounds for his crappy data store. --- citadel/config.c | 1 - citadel/control.c | 4 ++-- citadel/include/ctdl_module.h | 2 +- citadel/modules/imap/imap_store.c | 10 ++-------- citadel/modules/migrate/serv_migrate.c | 2 -- textclient/src/tuiconfig.c | 3 --- webcit/siteconfig.c | 2 +- webcit/static/t/aide/siteconfig/tab_imap.html | 3 --- 8 files changed, 6 insertions(+), 21 deletions(-) diff --git a/citadel/config.c b/citadel/config.c index 5328e3036..4dc7698b4 100644 --- a/citadel/config.c +++ b/citadel/config.c @@ -61,7 +61,6 @@ void brand_new_installation_set_defaults(void) { safestrncpy(config.c_aideroom, "Aide", sizeof config.c_aideroom); config.c_port_number = 504; config.c_sleeping = 900; - config.c_instant_expunge = 1; if (config.c_ctdluid == 0) { pw = getpwnam("citadel"); diff --git a/citadel/control.c b/citadel/control.c index 4a09a9adc..b19438bde 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -392,7 +392,7 @@ void cmd_conf(char *argbuf) cprintf("%d\n", config.c_smtps_port); cprintf("%d\n", config.c_enable_fulltext); cprintf("%d\n", config.c_auto_cull); - cprintf("%d\n", config.c_instant_expunge); + cprintf("1\n"); cprintf("%d\n", config.c_allow_spoofing); cprintf("%d\n", config.c_journal_email); cprintf("%d\n", config.c_journal_pubmsgs); @@ -599,7 +599,7 @@ void cmd_conf(char *argbuf) config.c_auto_cull = atoi(buf); break; case 44: - config.c_instant_expunge = atoi(buf); + /* niu */ break; case 45: config.c_allow_spoofing = atoi(buf); diff --git a/citadel/include/ctdl_module.h b/citadel/include/ctdl_module.h index ab182b362..3cab315e1 100644 --- a/citadel/include/ctdl_module.h +++ b/citadel/include/ctdl_module.h @@ -365,7 +365,7 @@ struct config { int c_pop3s_port; int c_smtps_port; char c_auto_cull; - char c_instant_expunge; + char c_niu_5; char c_allow_spoofing; char c_journal_email; char c_journal_pubmsgs; diff --git a/citadel/modules/imap/imap_store.c b/citadel/modules/imap/imap_store.c index 959e1235d..5685e2392 100644 --- a/citadel/modules/imap/imap_store.c +++ b/citadel/modules/imap/imap_store.c @@ -195,14 +195,8 @@ void imap_do_store(citimap_command *Cmd) { } free(ss_msglist); - - /* - * The following two commands implement "instant expunge" if enabled. - */ - if (config.c_instant_expunge) { - imap_do_expunge(); - imap_rescan_msgids(); - } + imap_do_expunge(); // Citadel always expunges immediately. + imap_rescan_msgids(); } diff --git a/citadel/modules/migrate/serv_migrate.c b/citadel/modules/migrate/serv_migrate.c index ddf52aeea..41a2fdf24 100644 --- a/citadel/modules/migrate/serv_migrate.c +++ b/citadel/modules/migrate/serv_migrate.c @@ -442,7 +442,6 @@ void migr_do_export(void) { cprintf("%d\n", config.c_pop3s_port); cprintf("%d\n", config.c_smtps_port); cprintf("%d\n", config.c_auto_cull); - cprintf("%d\n", config.c_instant_expunge); cprintf("%d\n", config.c_allow_spoofing); cprintf("%d\n", config.c_journal_email); cprintf("%d\n", config.c_journal_pubmsgs); @@ -676,7 +675,6 @@ void migr_xml_end(void *data, const char *el) { else if (!strcasecmp(el, "c_pop3s_port")) config.c_pop3s_port = atoi(migr_chardata); else if (!strcasecmp(el, "c_smtps_port")) config.c_smtps_port = atoi(migr_chardata); else if (!strcasecmp(el, "c_auto_cull")) config.c_auto_cull = atoi(migr_chardata); - else if (!strcasecmp(el, "c_instant_expunge")) config.c_instant_expunge = atoi(migr_chardata); else if (!strcasecmp(el, "c_allow_spoofing")) config.c_allow_spoofing = atoi(migr_chardata); else if (!strcasecmp(el, "c_journal_email")) config.c_journal_email = atoi(migr_chardata); else if (!strcasecmp(el, "c_journal_pubmsgs")) config.c_journal_pubmsgs = atoi(migr_chardata); diff --git a/textclient/src/tuiconfig.c b/textclient/src/tuiconfig.c index ed2b953c4..89db73163 100644 --- a/textclient/src/tuiconfig.c +++ b/textclient/src/tuiconfig.c @@ -221,9 +221,6 @@ void do_system_configuration(CtdlIPC *ipc) snprintf(sc[57], sizeof sc[57], "%d", (boolprompt( "Perform RBL checks at greeting instead of after RCPT", atoi(&sc[57][0])))); - snprintf(sc[44], sizeof sc[44], "%d", (boolprompt( - "Instantly expunge deleted IMAP messages", - atoi(&sc[44][0])))); /* LDAP settings */ if (ipc->ServInfo.supports_ldap) { diff --git a/webcit/siteconfig.c b/webcit/siteconfig.c index 2454f00d8..ecfc0cc65 100644 --- a/webcit/siteconfig.c +++ b/webcit/siteconfig.c @@ -187,7 +187,7 @@ CfgMapping ServerConfig[] = { {CFG_STR, 0, 0, "", HKEY("c_smtps_port")}, {CFG_YES, 0, 0, "", HKEY("c_enable_fulltext")}, {CFG_YES, 0, 0, "", HKEY("c_auto_cull")}, - {CFG_YES, 0, 0, "", HKEY("c_instant_expunge")}, + {CFG_YES, 0, 0, "", HKEY("reserved3")}, {CFG_YES, 0, 0, "", HKEY("c_allow_spoofing")}, {CFG_YES, 0, 0, "", HKEY("c_journal_email")}, {CFG_YES, 0, 0, "", HKEY("c_journal_pubmsgs")}, diff --git a/webcit/static/t/aide/siteconfig/tab_imap.html b/webcit/static/t/aide/siteconfig/tab_imap.html index 0f8a9920f..a064cc67f 100644 --- a/webcit/static/t/aide/siteconfig/tab_imap.html +++ b/webcit/static/t/aide/siteconfig/tab_imap.html @@ -11,7 +11,4 @@ > - -> - -- 2.30.2