Remove the SieveRules room. Keep sieve config in My Citadel Config
authorArt Cancro <ajc@citadel.org>
Wed, 25 Oct 2006 19:17:20 +0000 (19:17 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 25 Oct 2006 19:17:20 +0000 (19:17 +0000)
citadel/serv_managesieve.c
citadel/serv_sieve.c
citadel/sysconfig.h

index 3d619f24d8af6490086c42c6f1b60cb0f880588e..a6656c5b43193f0797828239e81ad2f31749b467 100644 (file)
@@ -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 $";
 }
 
index 276a588138be9b745e126d03892059ab78771133..5a80cba1918351ceff4848187446c76b811df008 100644 (file)
@@ -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 {
index 7a138576c69af5ea32b7dc8b8702c713f8ecc059..92dbee7a5d4906c96bb88b707fe7f37ed4a1e45d 100644 (file)
 #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__"