X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fsieve%2Fserv_sieve.c;h=85cd92a0c0d6bb365d4f6598768c250421e6f23d;hb=8c47559cb5ae97ec0fa35660ee16fd61a9451c72;hp=508f8d2188ce71ecf06889f181de4704f235b7db;hpb=84aa84fdd0a02f703c5e836f258e33f950c66355;p=citadel.git diff --git a/citadel/modules/sieve/serv_sieve.c b/citadel/modules/sieve/serv_sieve.c index 508f8d218..85cd92a0c 100644 --- a/citadel/modules/sieve/serv_sieve.c +++ b/citadel/modules/sieve/serv_sieve.c @@ -4,7 +4,21 @@ * This module glues libSieve to the Citadel server in order to implement * the Sieve mailbox filtering language (RFC 3028). * - * This code is released under the terms of the GNU General Public License. + * Copyright (c) 2007-2009 by the citadel.org team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "sysdep.h" @@ -31,6 +45,7 @@ #include #include #include +#include #include "citadel.h" #include "server.h" #include "citserver.h" @@ -41,14 +56,7 @@ #include "database.h" #include "msgbase.h" #include "internet_addressing.h" -#include "tools.h" - - #include "ctdl_module.h" - - -#ifdef HAVE_LIBSIEVE - #include "serv_sieve.h" struct RoomProcList *sieve_list = NULL; @@ -60,7 +68,7 @@ char *msiv_extensions = NULL; */ int ctdl_debug(sieve2_context_t *s, void *my) { - lprintf(CTDL_DEBUG, "Sieve: %s\n", sieve2_getvalue_string(s, "message")); + CtdlLogPrintf(CTDL_DEBUG, "Sieve: %s\n", sieve2_getvalue_string(s, "message")); return SIEVE2_OK; } @@ -70,7 +78,7 @@ int ctdl_debug(sieve2_context_t *s, void *my) */ int ctdl_errparse(sieve2_context_t *s, void *my) { - lprintf(CTDL_WARNING, "Error in script, line %d: %s\n", + CtdlLogPrintf(CTDL_WARNING, "Error in script, line %d: %s\n", sieve2_getvalue_int(s, "lineno"), sieve2_getvalue_string(s, "message") ); @@ -83,7 +91,7 @@ int ctdl_errparse(sieve2_context_t *s, void *my) */ int ctdl_errexec(sieve2_context_t *s, void *my) { - lprintf(CTDL_WARNING, "Error executing script: %s\n", + CtdlLogPrintf(CTDL_WARNING, "Error executing script: %s\n", sieve2_getvalue_string(s, "message") ); return SIEVE2_OK; @@ -102,27 +110,27 @@ int ctdl_redirect(sieve2_context_t *s, void *my) safestrncpy(recp, sieve2_getvalue_string(s, "address"), sizeof recp); - lprintf(CTDL_DEBUG, "Action is REDIRECT, recipient <%s>\n", recp); + CtdlLogPrintf(CTDL_DEBUG, "Action is REDIRECT, recipient <%s>\n", recp); - valid = validate_recipients(recp); + valid = validate_recipients(recp, NULL, 0); if (valid == NULL) { - lprintf(CTDL_WARNING, "REDIRECT failed: bad recipient <%s>\n", recp); + CtdlLogPrintf(CTDL_WARNING, "REDIRECT failed: bad recipient <%s>\n", recp); return SIEVE2_ERROR_BADARGS; } if (valid->num_error > 0) { - lprintf(CTDL_WARNING, "REDIRECT failed: bad recipient <%s>\n", recp); + CtdlLogPrintf(CTDL_WARNING, "REDIRECT failed: bad recipient <%s>\n", recp); free_recipients(valid); return SIEVE2_ERROR_BADARGS; } msg = CtdlFetchMessage(cs->msgnum, 1); if (msg == NULL) { - lprintf(CTDL_WARNING, "REDIRECT failed: unable to fetch msg %ld\n", cs->msgnum); + CtdlLogPrintf(CTDL_WARNING, "REDIRECT failed: unable to fetch msg %ld\n", cs->msgnum); free_recipients(valid); return SIEVE2_ERROR_BADARGS; } - CtdlSubmitMsg(msg, valid, NULL); + CtdlSubmitMsg(msg, valid, NULL, 0); cs->cancel_implicit_keep = 1; free_recipients(valid); CtdlFreeMessage(msg); @@ -137,7 +145,7 @@ int ctdl_keep(sieve2_context_t *s, void *my) { struct ctdl_sieve *cs = (struct ctdl_sieve *)my; - lprintf(CTDL_DEBUG, "Action is KEEP\n"); + CtdlLogPrintf(CTDL_DEBUG, "Action is KEEP\n"); cs->keep = 1; cs->cancel_implicit_keep = 1; @@ -156,7 +164,7 @@ int ctdl_fileinto(sieve2_context_t *s, void *my) char foldername[256]; char original_room_name[ROOMNAMELEN]; - lprintf(CTDL_DEBUG, "Action is FILEINTO, destination is <%s>\n", dest_folder); + CtdlLogPrintf(CTDL_DEBUG, "Action is FILEINTO, destination is <%s>\n", dest_folder); /* FILEINTO 'INBOX' is the same thing as KEEP */ if ( (!strcasecmp(dest_folder, "INBOX")) || (!strcasecmp(dest_folder, MAILROOM)) ) { @@ -179,7 +187,7 @@ int ctdl_fileinto(sieve2_context_t *s, void *my) } if (c != 0) { - lprintf(CTDL_WARNING, "FILEINTO failed: target <%s> does not exist\n", dest_folder); + CtdlLogPrintf(CTDL_WARNING, "FILEINTO failed: target <%s> does not exist\n", dest_folder); return SIEVE2_ERROR_BADARGS; } @@ -210,7 +218,7 @@ int ctdl_discard(sieve2_context_t *s, void *my) { struct ctdl_sieve *cs = (struct ctdl_sieve *)my; - lprintf(CTDL_DEBUG, "Action is DISCARD\n"); + CtdlLogPrintf(CTDL_DEBUG, "Action is DISCARD\n"); /* Cancel the implicit keep. That's all there is to it. */ cs->cancel_implicit_keep = 1; @@ -227,11 +235,11 @@ int ctdl_reject(sieve2_context_t *s, void *my) struct ctdl_sieve *cs = (struct ctdl_sieve *)my; char *reject_text = NULL; - lprintf(CTDL_DEBUG, "Action is REJECT\n"); + CtdlLogPrintf(CTDL_DEBUG, "Action is REJECT\n"); /* If we don't know who sent the message, do a DISCARD instead. */ - if (strlen(cs->sender) == 0) { - lprintf(CTDL_INFO, "Unknown sender. Doing DISCARD instead of REJECT.\n"); + if (IsEmptyStr(cs->sender)) { + CtdlLogPrintf(CTDL_INFO, "Unknown sender. Doing DISCARD instead of REJECT.\n"); return ctdl_discard(s, my); } @@ -282,7 +290,7 @@ int ctdl_vacation(sieve2_context_t *s, void *my) char *vacamsg_text = NULL; char vacamsg_subject[1024]; - lprintf(CTDL_DEBUG, "Action is VACATION\n"); + CtdlLogPrintf(CTDL_DEBUG, "Action is VACATION\n"); message = sieve2_getvalue_string(s, "message"); if (message == NULL) return SIEVE2_ERROR_BADARGS; @@ -302,7 +310,7 @@ int ctdl_vacation(sieve2_context_t *s, void *my) for (vptr = cs->u->first_vacation; vptr != NULL; vptr = vptr->next) { if (!strcasecmp(vptr->fromaddr, cs->sender)) { if ( (time(NULL) - vptr->timestamp) < (days * 86400) ) { - lprintf(CTDL_DEBUG, "Already alerted <%s> recently.\n", cs->sender); + CtdlLogPrintf(CTDL_DEBUG, "Already alerted <%s> recently.\n", cs->sender); return SIEVE2_OK; } } @@ -386,9 +394,34 @@ int ctdl_getenvelope(sieve2_context_t *s, void *my) { struct ctdl_sieve *cs = (struct ctdl_sieve *)my; - lprintf(CTDL_DEBUG, "Action is GETENVELOPE\n"); - sieve2_setvalue_string(s, "to", cs->envelope_to); - sieve2_setvalue_string(s, "from", cs->envelope_from); + CtdlLogPrintf(CTDL_DEBUG, "Action is GETENVELOPE\nEnvFrom: %s\n EnvTo: %s\n", + cs->envelope_from, cs->envelope_to); + + if (cs->envelope_from != NULL) { + if ((cs->envelope_from[0] != '@')&&(cs->envelope_from[strlen(cs->envelope_from)-1] != '@')) { + sieve2_setvalue_string(s, "from", cs->envelope_from); + } + else { + sieve2_setvalue_string(s, "from", "invalid_envelope_from@example.org"); + } + } + else { + sieve2_setvalue_string(s, "from", "null_envelope_from@example.org"); + } + + + if (cs->envelope_to != NULL) { + if ((cs->envelope_to[0] != '@') && (cs->envelope_to[strlen(cs->envelope_to)-1] != '@')) { + sieve2_setvalue_string(s, "to", cs->envelope_to); + } + else { + sieve2_setvalue_string(s, "to", "invalid_envelope_to@example.org"); + } + } + else { + sieve2_setvalue_string(s, "to", "null_envelope_to@example.org"); + } + return SIEVE2_OK; } @@ -433,13 +466,13 @@ int ctdl_getscript(sieve2_context_t *s, void *my) { for (sptr=cs->u->first_script; sptr!=NULL; sptr=sptr->next) { if (sptr->script_active > 0) { - lprintf(CTDL_DEBUG, "ctdl_getscript() is using script '%s'\n", sptr->script_name); + CtdlLogPrintf(CTDL_DEBUG, "ctdl_getscript() is using script '%s'\n", sptr->script_name); sieve2_setvalue_string(s, "script", sptr->script_content); return SIEVE2_OK; } } - lprintf(CTDL_DEBUG, "ctdl_getscript() found no active script\n"); + CtdlLogPrintf(CTDL_DEBUG, "ctdl_getscript() found no active script\n"); return SIEVE2_ERROR_GETSCRIPT; } @@ -450,7 +483,7 @@ int ctdl_getheaders(sieve2_context_t *s, void *my) { struct ctdl_sieve *cs = (struct ctdl_sieve *)my; - lprintf(CTDL_DEBUG, "ctdl_getheaders() was called\n"); + CtdlLogPrintf(CTDL_DEBUG, "ctdl_getheaders() was called\n"); sieve2_setvalue_string(s, "allheaders", cs->rfc822headers); return SIEVE2_OK; } @@ -471,7 +504,7 @@ void sieve_queue_room(struct ctdlroom *which_room) { ptr->next = sieve_list; sieve_list = ptr; end_critical_section(S_SIEVELIST); - lprintf(CTDL_DEBUG, "<%s> queued for Sieve processing\n", which_room->QRname); + CtdlLogPrintf(CTDL_DEBUG, "<%s> queued for Sieve processing\n", which_room->QRname); } @@ -481,7 +514,7 @@ void sieve_queue_room(struct ctdlroom *which_room) { */ void sieve_do_msg(long msgnum, void *userdata) { struct sdm_userdata *u = (struct sdm_userdata *) userdata; - sieve2_context_t *sieve2_context = u->sieve2_context; + sieve2_context_t *sieve2_context; struct ctdl_sieve my; int res; struct CtdlMessage *msg; @@ -489,18 +522,30 @@ void sieve_do_msg(long msgnum, void *userdata) { size_t headers_len = 0; int len = 0; - lprintf(CTDL_DEBUG, "Performing sieve processing on msg <%ld>\n", msgnum); + if (u == NULL) + { + CtdlLogPrintf(CTDL_EMERG, "Can't process message <%ld> without userdata!\n", msgnum); + return; + } - msg = CtdlFetchMessage(msgnum, 0); + sieve2_context = u->sieve2_context; + + CtdlLogPrintf(CTDL_DEBUG, "Performing sieve processing on msg <%ld>\n", msgnum); + + /* + * Make sure you include message body so you can get those second-level headers ;) + */ + msg = CtdlFetchMessage(msgnum, 1); if (msg == NULL) return; /* * Grab the message headers so we can feed them to libSieve. + * Use HEADERS_ONLY rather than HEADERS_FAST in order to include second-level headers. */ CC->redirect_buffer = malloc(SIZ); CC->redirect_len = 0; CC->redirect_alloc = SIZ; - CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_ONLY, 0, 1); + CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_ONLY, 0, 1, 0); my.rfc822headers = CC->redirect_buffer; headers_len = CC->redirect_len; CC->redirect_buffer = NULL; @@ -552,9 +597,11 @@ void sieve_do_msg(long msgnum, void *userdata) { /* Keep track of the envelope-from address (use body-from if not found) */ if (msg->cm_fields['P'] != NULL) { safestrncpy(my.envelope_from, msg->cm_fields['P'], sizeof my.envelope_from); + stripallbut(my.envelope_from, '<', '>'); } else if (msg->cm_fields['F'] != NULL) { safestrncpy(my.envelope_from, msg->cm_fields['F'], sizeof my.envelope_from); + stripallbut(my.envelope_from, '<', '>'); } else { strcpy(my.envelope_from, ""); @@ -572,6 +619,7 @@ void sieve_do_msg(long msgnum, void *userdata) { /* Keep track of the envelope-to address (use body-to if not found) */ if (msg->cm_fields['V'] != NULL) { safestrncpy(my.envelope_to, msg->cm_fields['V'], sizeof my.envelope_to); + stripallbut(my.envelope_to, '<', '>'); } else if (msg->cm_fields['R'] != NULL) { safestrncpy(my.envelope_to, msg->cm_fields['R'], sizeof my.envelope_to); @@ -579,6 +627,7 @@ void sieve_do_msg(long msgnum, void *userdata) { strcat(my.envelope_to, "@"); strcat(my.envelope_to, msg->cm_fields['D']); } + stripallbut(my.envelope_to, '<', '>'); } else { strcpy(my.envelope_to, ""); @@ -597,10 +646,10 @@ void sieve_do_msg(long msgnum, void *userdata) { sieve2_setvalue_string(sieve2_context, "allheaders", my.rfc822headers); - lprintf(CTDL_DEBUG, "Calling sieve2_execute()\n"); + CtdlLogPrintf(CTDL_DEBUG, "Calling sieve2_execute()\n"); res = sieve2_execute(sieve2_context, &my); if (res != SIEVE2_OK) { - lprintf(CTDL_CRIT, "sieve2_execute() returned %d: %s\n", res, sieve2_errstr(res)); + CtdlLogPrintf(CTDL_CRIT, "sieve2_execute() returned %d: %s\n", res, sieve2_errstr(res)); } free(my.rfc822headers); @@ -611,11 +660,11 @@ void sieve_do_msg(long msgnum, void *userdata) { * if no other action was successfully taken. */ if ( (!my.keep) && (my.cancel_implicit_keep) ) { - lprintf(CTDL_DEBUG, "keep is 0 -- deleting message from inbox\n"); + CtdlLogPrintf(CTDL_DEBUG, "keep is 0 -- deleting message from inbox\n"); CtdlDeleteMessages(CC->room.QRname, &msgnum, 1, ""); } - lprintf(CTDL_DEBUG, "Completed sieve processing on msg <%ld>\n", msgnum); + CtdlLogPrintf(CTDL_DEBUG, "Completed sieve processing on msg <%ld>\n", msgnum); u->lastproc = msgnum; return; @@ -769,19 +818,23 @@ void rewrite_ctdl_sieve_config(struct sdm_userdata *u, int yes_write_to_disk) { sprintf(&text[strlen(text)], CTDLSIEVECONFIGSEPARATOR); } - /* Save the config */ - quickie_message("Citadel", NULL, NULL, u->config_roomname, - text, - 4, - "Sieve configuration" - ); - - free (text); - /* And delete the old one */ - if (u->config_msgnum > 0) { - CtdlDeleteMessages(u->config_roomname, &u->config_msgnum, 1, ""); + if (yes_write_to_disk) + { + /* Save the config */ + quickie_message("Citadel", NULL, NULL, u->config_roomname, + text, + 4, + "Sieve configuration" + ); + + /* And delete the old one */ + if (u->config_msgnum > 0) { + CtdlDeleteMessages(u->config_roomname, &u->config_msgnum, 1, ""); + } } + free (text); + } @@ -831,7 +884,7 @@ void sieve_do_room(char *roomname) { */ 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); + CtdlLogPrintf(CTDL_DEBUG, "<%s> does not exist. No processing is required.\n", u.config_roomname); return; } @@ -843,14 +896,14 @@ void sieve_do_room(char *roomname) { get_sieve_config_backend, (void *)&u ); if (u.config_msgnum < 0) { - lprintf(CTDL_DEBUG, "No Sieve rules exist. No processing is required.\n"); + CtdlLogPrintf(CTDL_DEBUG, "No Sieve rules exist. No processing is required.\n"); return; } - lprintf(CTDL_DEBUG, "Rules found. Performing Sieve processing for <%s>\n", roomname); + CtdlLogPrintf(CTDL_DEBUG, "Rules found. Performing Sieve processing for <%s>\n", roomname); if (getroom(&CC->room, roomname) != 0) { - lprintf(CTDL_CRIT, "ERROR: cannot load <%s>\n", roomname); + CtdlLogPrintf(CTDL_CRIT, "ERROR: cannot load <%s>\n", roomname); return; } @@ -858,13 +911,13 @@ void sieve_do_room(char *roomname) { res = sieve2_alloc(&sieve2_context); if (res != SIEVE2_OK) { - lprintf(CTDL_CRIT, "sieve2_alloc() returned %d: %s\n", res, sieve2_errstr(res)); + CtdlLogPrintf(CTDL_CRIT, "sieve2_alloc() returned %d: %s\n", res, sieve2_errstr(res)); return; } res = sieve2_callbacks(sieve2_context, ctdl_sieve_callbacks); if (res != SIEVE2_OK) { - lprintf(CTDL_CRIT, "sieve2_callbacks() returned %d: %s\n", res, sieve2_errstr(res)); + CtdlLogPrintf(CTDL_CRIT, "sieve2_callbacks() returned %d: %s\n", res, sieve2_errstr(res)); goto BAIL; } @@ -875,7 +928,7 @@ void sieve_do_room(char *roomname) { my.u = &u; res = sieve2_validate(sieve2_context, &my); if (res != SIEVE2_OK) { - lprintf(CTDL_CRIT, "sieve2_validate() returned %d: %s\n", res, sieve2_errstr(res)); + CtdlLogPrintf(CTDL_CRIT, "sieve2_validate() returned %d: %s\n", res, sieve2_errstr(res)); goto BAIL; } @@ -890,7 +943,7 @@ void sieve_do_room(char *roomname) { BAIL: res = sieve2_free(&sieve2_context); if (res != SIEVE2_OK) { - lprintf(CTDL_CRIT, "sieve2_free() returned %d: %s\n", res, sieve2_errstr(res)); + CtdlLogPrintf(CTDL_CRIT, "sieve2_free() returned %d: %s\n", res, sieve2_errstr(res)); } /* Rewrite the config if we have to */ @@ -905,7 +958,7 @@ void perform_sieve_processing(void) { struct RoomProcList *ptr = NULL; if (sieve_list != NULL) { - lprintf(CTDL_DEBUG, "Begin Sieve processing\n"); + CtdlLogPrintf(CTDL_DEBUG, "Begin Sieve processing\n"); while (sieve_list != NULL) { char spoolroomname[ROOMNAMELEN]; safestrncpy(spoolroomname, sieve_list->name, sizeof spoolroomname); @@ -953,6 +1006,15 @@ void msiv_load(struct sdm_userdata *u) { } void msiv_store(struct sdm_userdata *u, int yes_write_to_disk) { +/* + * Initialise the sieve configs last processed message number. + * We don't need to get the highest message number for the users inbox since the systems + * highest message number will be higher than that and loer than this scripts message number + * This prevents this new script from processing any old messages in the inbox. + * Most importantly it will prevent vacation messages being sent to lots of old messages + * in the inbox. + */ + u->lastproc = CtdlGetCurrentMessageNumber(); rewrite_ctdl_sieve_config(u, yes_write_to_disk); } @@ -969,7 +1031,7 @@ int msiv_setactive(struct sdm_userdata *u, char *script_name) { /* First see if the supplied value is ok */ - if (strlen(script_name) == 0) { + if (IsEmptyStr(script_name)) { ok = 1; } else { @@ -1108,9 +1170,9 @@ void cmd_msiv(char *argbuf) { if (!strcasecmp(subcmd, "putscript")) { extract_token(script_name, argbuf, 1, '|', sizeof script_name); - if (strlen(script_name) > 0) { + if (!IsEmptyStr(script_name)) { cprintf("%d Transmit script now\n", SEND_LISTING); - script_content = CtdlReadMessageBody("000", config.c_maxmsglen, NULL, 0); + script_content = CtdlReadMessageBody("000", config.c_maxmsglen, NULL, 0, 0); msiv_putscript(&u, script_name, script_content); changes_made = 1; } @@ -1213,7 +1275,7 @@ void ctdl_sieve_init(void) { strcpy(&cred[55], "..."); } - lprintf(CTDL_INFO, "%s\n",cred); + CtdlLogPrintf(CTDL_INFO, "%s\n",cred); free(cred); /* Briefly initialize a Sieve parser instance just so we can list the @@ -1221,22 +1283,22 @@ void ctdl_sieve_init(void) { */ res = sieve2_alloc(&sieve2_context); if (res != SIEVE2_OK) { - lprintf(CTDL_CRIT, "sieve2_alloc() returned %d: %s\n", res, sieve2_errstr(res)); + CtdlLogPrintf(CTDL_CRIT, "sieve2_alloc() returned %d: %s\n", res, sieve2_errstr(res)); return; } res = sieve2_callbacks(sieve2_context, ctdl_sieve_callbacks); if (res != SIEVE2_OK) { - lprintf(CTDL_CRIT, "sieve2_callbacks() returned %d: %s\n", res, sieve2_errstr(res)); + CtdlLogPrintf(CTDL_CRIT, "sieve2_callbacks() returned %d: %s\n", res, sieve2_errstr(res)); goto BAIL; } msiv_extensions = strdup(sieve2_listextensions(sieve2_context)); - lprintf(CTDL_INFO, "Extensions: %s\n", msiv_extensions); + CtdlLogPrintf(CTDL_INFO, "Extensions: %s\n", msiv_extensions); BAIL: res = sieve2_free(&sieve2_context); if (res != SIEVE2_OK) { - lprintf(CTDL_CRIT, "sieve2_free() returned %d: %s\n", res, sieve2_errstr(res)); + CtdlLogPrintf(CTDL_CRIT, "sieve2_free() returned %d: %s\n", res, sieve2_errstr(res)); } } @@ -1249,26 +1311,17 @@ int serv_sieve_room(struct ctdlroom *room) return 0; } -#endif /* HAVE_LIBSIEVE */ - CTDL_MODULE_INIT(sieve) { + if (!threading) + { -#ifdef HAVE_LIBSIEVE - - ctdl_sieve_init(); - CtdlRegisterProtoHook(cmd_msiv, "MSIV", "Manage Sieve scripts"); - - CtdlRegisterRoomHook(serv_sieve_room); - - CtdlRegisterSessionHook(perform_sieve_processing, EVT_HOUSE); - -#else /* HAVE_LIBSIEVE */ - - lprintf(CTDL_INFO, "This server is missing libsieve. Mailbox filtering will be disabled.\n"); - -#endif /* HAVE_LIBSIEVE */ - + ctdl_sieve_init(); + CtdlRegisterProtoHook(cmd_msiv, "MSIV", "Manage Sieve scripts"); + CtdlRegisterRoomHook(serv_sieve_room); + CtdlRegisterSessionHook(perform_sieve_processing, EVT_HOUSE); + } + /* return our Subversion id for the Log */ return "$Id$"; }