From 0f248f8f9b0d8585d0b49d27dcd78577f0f4985f Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 25 Oct 2006 19:17:20 +0000 Subject: [PATCH] Remove the SieveRules room. Keep sieve config in My Citadel Config --- citadel/serv_managesieve.c | 31 ------------------------------- citadel/serv_sieve.c | 6 +++--- citadel/sysconfig.h | 1 - 3 files changed, 3 insertions(+), 35 deletions(-) diff --git a/citadel/serv_managesieve.c b/citadel/serv_managesieve.c index 3d619f24d..a6656c5b4 100644 --- a/citadel/serv_managesieve.c +++ b/citadel/serv_managesieve.c @@ -118,27 +118,6 @@ void sieve_outbuf_append(char *str) MGSVE->imap_format_outstring = buf; } -void goto_sieverules_room(void) -{// TODO: check if we're authenticated. - struct ctdlroom QRscratch; - int c; - char augmented_roomname[ROOMNAMELEN]; - int transiently = 0; - - MailboxName(augmented_roomname, sizeof augmented_roomname, - &CC->user, SIEVERULES); - c = getroom(&QRscratch, augmented_roomname); - if (c != 0)/* something went wrong. hit it! */ - { - cprintf("BYE\r\n"); - CC->kill_me = 1; - return; - } - /* move to the sieve room. */ - memcpy(&CC->room, &QRscratch, - sizeof(struct ctdlroom)); - usergoto(NULL, 0, transiently, NULL, NULL); -} /** * Capability listing. Printed as greeting or on "CAPABILITIES" @@ -591,15 +570,6 @@ void _mgsve_starttls(void) #endif -/* - * Create the Sieve script room if it doesn't already exist - */ -void mgsve_create_room(void) -{ - create_room(SIEVERULES, 4, "", 0, 1, 0, VIEW_SIEVE); -} - - /* * Main command loop for managesieve sessions. */ @@ -687,7 +657,6 @@ char *serv_managesieve_init(void) managesieve_command_loop, NULL); - CtdlRegisterSessionHook(mgsve_create_room, EVT_LOGIN); return "$Id: serv_managesieve.c 4570 2006-08-27 02:07:18Z dothebart $"; } diff --git a/citadel/serv_sieve.c b/citadel/serv_sieve.c index 276a58813..5a80cba19 100644 --- a/citadel/serv_sieve.c +++ b/citadel/serv_sieve.c @@ -787,7 +787,7 @@ void sieve_do_room(char *roomname) { /* See if the user who owns this 'mailbox' has any Sieve scripts that * require execution. */ - snprintf(u.config_roomname, sizeof u.config_roomname, "%010ld.%s", atol(roomname), SIEVERULES); + snprintf(u.config_roomname, sizeof u.config_roomname, "%010ld.%s", atol(roomname), USERCONFIGROOM); if (getroom(&CC->room, u.config_roomname) != 0) { lprintf(CTDL_DEBUG, "<%s> does not exist. No processing is required.\n", u.config_roomname); return; @@ -898,7 +898,7 @@ void msiv_load(struct sdm_userdata *u) { strcpy(hold_rm, CC->room.QRname); /* save current room */ /* Take a spin through the user's personal address book */ - if (getroom(&CC->room, SIEVERULES) == 0) { + if (getroom(&CC->room, USERCONFIGROOM) == 0) { u->config_msgnum = (-1); strcpy(u->config_roomname, CC->room.QRname); @@ -1104,7 +1104,7 @@ void cmd_msiv(char *argbuf) { extract_token(script_name, argbuf, 1, '|', sizeof script_name); script_content = msiv_getscript(&u, script_name); if (script_content != NULL) { - cprintf("%d Script:\n", SEND_LISTING); + cprintf("%d Script:\n", LISTING_FOLLOWS); cprintf("%s000\n", script_content); } else { diff --git a/citadel/sysconfig.h b/citadel/sysconfig.h index 7a138576c..92dbee7a5 100644 --- a/citadel/sysconfig.h +++ b/citadel/sysconfig.h @@ -110,7 +110,6 @@ #define USERNOTESROOM "Notes" #define USERTRASHROOM "Trash" #define PAGELOGROOM "Sent/Received Pages" -#define SIEVERULES "SieveRules" #define SYSCONFIGROOM "Local System Configuration" #define SMTP_SPOOLOUT_ROOM "__CitadelSMTPspoolout__" #define DELETED_MSGS_ROOM "__CitadelDeletedMessages__" -- 2.30.2