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"
#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.
*/
managesieve_command_loop,
NULL);
- CtdlRegisterSessionHook(mgsve_create_room, EVT_LOGIN);
return "$Id: serv_managesieve.c 4570 2006-08-27 02:07:18Z dothebart $";
}
/* 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;
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);
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 {
#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__"