2 * This module handles shared rooms, inter-Citadel mail, and outbound
3 * mailing list processing.
5 * Copyright (c) 2000-2012 by the citadel.org team
7 * This program is open source software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License, version 3.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * ** NOTE ** A word on the S_NETCONFIGS semaphore:
16 * This is a fairly high-level type of critical section. It ensures that no
17 * two threads work on the netconfigs files at the same time. Since we do
18 * so many things inside these, here are the rules:
19 * 1. begin_critical_section(S_NETCONFIGS) *before* begin_ any others.
20 * 2. Do *not* perform any I/O with the client during these sections.
25 * Duration of time (in seconds) after which pending list subscribe/unsubscribe
26 * requests that have not been confirmed will be deleted.
28 #define EXP 259200 /* three days */
40 #include <sys/types.h>
42 #if TIME_WITH_SYS_TIME
43 # include <sys/time.h>
47 # include <sys/time.h>
55 # if HAVE_SYS_SYSCALL_H
56 # include <sys/syscall.h>
63 #include <libcitadel.h>
66 #include "citserver.h"
72 #include "internet_addressing.h"
73 #include "serv_network.h"
74 #include "clientsocket.h"
76 #include "citadel_dirs.h"
80 #include "ctdl_module.h"
92 #define IFTODT(mode) (((mode) & 0170000) >> 12)
93 #define DTTOIF(dirtype) ((dirtype) << 12)
97 void ParseLastSent(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *OneRNCFG)
100 nptr = (RoomNetCfgLine *)
101 malloc(sizeof(RoomNetCfgLine));
102 memset(nptr, 0, sizeof(RoomNetCfgLine));
103 OneRNCFG->lastsent = extract_long(LinePos, 0);
104 OneRNCFG->NetConfigs[ThisOne->C] = nptr;
107 void ParseRoomAlias(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *rncfg)
110 if (rncfg->RNCfg->sender != NULL)
111 continue; / * just one alowed... * /
112 extract_token(nptr->name, buf, 1, '|', sizeof nptr->name);
113 rncfg->RNCfg->sender = nptr;
117 void ParseSubPendingLine(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *OneRNCFG)
119 if (time(NULL) - extract_long(LinePos, 3) > EXP)
120 return; /* expired subscription... */
122 ParseGeneric(ThisOne, Line, LinePos, OneRNCFG);
124 void ParseUnSubPendingLine(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *OneRNCFG)
126 if (time(NULL) - extract_long(LinePos, 2) > EXP)
127 return; /* expired subscription... */
129 ParseGeneric(ThisOne, Line, LinePos, OneRNCFG);
133 void SerializeLastSent(const CfgLineType *ThisOne, StrBuf *OutputBuffer, OneRoomNetCfg *RNCfg, RoomNetCfgLine *data)
135 StrBufAppendBufPlain(OutputBuffer, CKEY(ThisOne->Str), 0);
136 StrBufAppendPrintf(OutputBuffer, "|%ld\n", RNCfg->lastsent);
139 void DeleteLastSent(const CfgLineType *ThisOne, RoomNetCfgLine **data)
145 RoomNetCfg SpoolCfgs [4] = {
153 int HaveSpoolConfig(OneRoomNetCfg* RNCfg)
157 for (i=0; i < 4; i++) if (RNCfg->NetConfigs[SpoolCfgs[i]] == NULL) interested = 1;
163 void InspectQueuedRoom(SpoolControl **pSC,
164 RoomProcList *room_to_spool,
165 HashList *working_ignetcfg,
166 HashList *the_netmap)
171 sc = (SpoolControl*)malloc(sizeof(SpoolControl));
172 memset(sc, 0, sizeof(SpoolControl));
173 sc->RNCfg = room_to_spool->OneRNCfg;
174 sc->lastsent = room_to_spool->lastsent;
175 sc->working_ignetcfg = working_ignetcfg;
176 sc->the_netmap = the_netmap;
179 * If the room doesn't exist, don't try to perform its networking tasks.
180 * Normally this should never happen, but once in a while maybe a room gets
181 * queued for networking and then deleted before it can happen.
183 if (CtdlGetRoom(&sc->room, room_to_spool->name) != 0) {
184 syslog(LOG_CRIT, "ERROR: cannot load <%s>\n", room_to_spool->name);
188 if (sc->room.QRhighest <= sc->lastsent)
190 syslog(LOG_DEBUG, "nothing to do for <%s>\n", room_to_spool->name);
195 if (sc->RNCfg == NULL)
196 sc->RNCfg = CtdlGetNetCfgForRoom(sc->room.QRnumber);
198 if (!HaveSpoolConfig(sc->RNCfg))
201 /* nothing to do for this room... */
205 /* Now lets remember whats needed for the actual work... */
207 for (i=0; i < 4; i++)
209 aggregate_recipients(&sc->Users[SpoolCfgs[i]], SpoolCfgs[i], sc->RNCfg);
212 if (StrLength(sc->RNCfg->Sender) > 0)
213 sc->Users[roommailalias] = NewStrBufDup(sc->RNCfg->Sender);
222 * Batch up and send all outbound traffic from the current room
224 void network_spoolout_room(SpoolControl *sc)
226 struct CitContext *CCC = CC;
232 * If the room doesn't exist, don't try to perform its networking tasks.
233 * Normally this should never happen, but once in a while maybe a room gets
234 * queued for networking and then deleted before it can happen.
236 memcpy (&CCC->room, &sc->room, sizeof(ctdlroom));
238 syslog(LOG_INFO, "Networking started for <%s>\n", CCC->room.QRname);
240 /* If there are digest recipients, we have to build a digest */
241 if (sc->Users[digestrecp] != NULL) {
242 sc->digestfp = tmpfile();
243 fprintf(sc->digestfp, "Content-type: text/plain\n\n");
246 /* remember where we started... */
247 lastsent = sc->lastsent;
249 /* Do something useful */
250 CtdlForEachMessage(MSGS_GT, sc->lastsent, NULL, NULL, NULL,
251 network_spool_msg, sc);
253 /* If we wrote a digest, deliver it and then close it */
254 if (StrLength(sc->Users[roommailalias]) > 0)
257 len = StrLength(sc->Users[roommailalias]);
258 if (len + 1 > sizeof(buf))
259 len = sizeof(buf) - 1;
260 memcpy(buf, ChrPtr(sc->Users[roommailalias]), len);
265 snprintf(buf, sizeof buf, "room_%s@%s",
266 CCC->room.QRname, config.c_fqdn);
269 for (i=0; buf[i]; ++i) {
270 buf[i] = tolower(buf[i]);
271 if (isspace(buf[i])) buf[i] = '_';
273 if (sc->digestfp != NULL) {
274 fprintf(sc->digestfp,
275 " -----------------------------------"
276 "------------------------------------"
278 "You are subscribed to the '%s' "
280 "To post to the list: %s\n",
281 CCC->room.QRname, buf
283 network_deliver_digest(sc); /* deliver and close */
286 /* Now rewrite the config file */
287 if (sc->lastsent != lastsent)
289 sc->RNCfg = CtdlGetNetCfgForRoom(sc->room.QRnumber);
291 sc->RNCfg->lastsent = sc->lastsent;
292 sc->RNCfg->changed = 1;
294 end_critical_section(S_NETCONFIGS);
298 * Process a buffer containing a single message from a single file
299 * from the inbound queue
301 void network_process_buffer(char *buffer, long size, HashList *working_ignetcfg, HashList *the_netmap, int *netmap_changed)
303 struct CitContext *CCC = CC;
305 struct CtdlMessage *msg = NULL;
308 struct recptypes *recp = NULL;
309 char target_room[ROOMNAMELEN];
310 struct ser_ret sermsg;
311 char *oldpath = NULL;
312 char filename[PATH_MAX];
314 const StrBuf *nexthop = NULL;
315 unsigned char firstbyte;
316 unsigned char lastbyte;
318 QN_syslog(LOG_DEBUG, "network_process_buffer() processing %ld bytes\n", size);
320 /* Validate just a little bit. First byte should be FF and * last byte should be 00. */
321 firstbyte = buffer[0];
322 lastbyte = buffer[size-1];
323 if ( (firstbyte != 255) || (lastbyte != 0) ) {
324 QN_syslog(LOG_ERR, "Corrupt message ignored. Length=%ld, firstbyte = %d, lastbyte = %d\n",
325 size, firstbyte, lastbyte);
329 /* Set default target room to trash */
330 strcpy(target_room, TWITROOM);
332 /* Load the message into memory */
333 msg = (struct CtdlMessage *) malloc(sizeof(struct CtdlMessage));
334 memset(msg, 0, sizeof(struct CtdlMessage));
335 msg->cm_magic = CTDLMESSAGE_MAGIC;
336 msg->cm_anon_type = buffer[1];
337 msg->cm_format_type = buffer[2];
339 for (pos = 3; pos < size; ++pos) {
341 msg->cm_fields[field] = strdup(&buffer[pos+1]);
342 pos = pos + strlen(&buffer[(int)pos]);
345 /* Check for message routing */
346 if (msg->cm_fields['D'] != NULL) {
347 if (strcasecmp(msg->cm_fields['D'], config.c_nodename)) {
349 /* route the message */
350 Buf = NewStrBufPlain(msg->cm_fields['D'], -1);
351 if (CtdlIsValidNode(&nexthop,
357 /* prepend our node to the path */
358 if (msg->cm_fields['P'] != NULL) {
359 oldpath = msg->cm_fields['P'];
360 msg->cm_fields['P'] = NULL;
363 oldpath = strdup("unknown_user");
365 size = strlen(oldpath) + SIZ;
366 msg->cm_fields['P'] = malloc(size);
367 snprintf(msg->cm_fields['P'], size, "%s!%s",
368 config.c_nodename, oldpath);
371 /* serialize the message */
372 serialize_message(&sermsg, msg);
375 if (StrLength(nexthop) == 0) {
386 QN_syslog(LOG_DEBUG, "Appending to %s\n", filename);
387 fp = fopen(filename, "ab");
389 fwrite(sermsg.ser, sermsg.len, 1, fp);
393 QN_syslog(LOG_ERR, "%s: %s\n", filename, strerror(errno));
396 CtdlFreeMessage(msg);
401 else { /* invalid destination node name */
405 "A message you sent could not be delivered due to an invalid destination node"
406 " name. Please check the address and try sending the message again.\n");
415 * Check to see if we already have a copy of this message, and
416 * abort its processing if so. (We used to post a warning to Aide>
417 * every time this happened, but the network is now so densely
418 * connected that it's inevitable.)
420 if (network_usetable(msg) != 0) {
421 CtdlFreeMessage(msg);
425 /* Learn network topology from the path */
426 if ((msg->cm_fields['N'] != NULL) && (msg->cm_fields['P'] != NULL)) {
427 NetworkLearnTopology(msg->cm_fields['N'],
433 /* Is the sending node giving us a very persuasive suggestion about
434 * which room this message should be saved in? If so, go with that.
436 if (msg->cm_fields['C'] != NULL) {
437 safestrncpy(target_room, msg->cm_fields['C'], sizeof target_room);
440 /* Otherwise, does it have a recipient? If so, validate it... */
441 else if (msg->cm_fields['R'] != NULL) {
442 recp = validate_recipients(msg->cm_fields['R'], NULL, 0);
443 if (recp != NULL) if (recp->num_error != 0) {
445 "A message you sent could not be delivered due to an invalid address.\n"
446 "Please check the address and try sending the message again.\n");
448 free_recipients(recp);
449 QNM_syslog(LOG_DEBUG, "Bouncing message due to invalid recipient address.\n");
452 strcpy(target_room, ""); /* no target room if mail */
455 /* Our last shot at finding a home for this message is to see if
456 * it has the O field (Originating room) set.
458 else if (msg->cm_fields['O'] != NULL) {
459 safestrncpy(target_room, msg->cm_fields['O'], sizeof target_room);
462 /* Strip out fields that are only relevant during transit */
463 if (msg->cm_fields['D'] != NULL) {
464 free(msg->cm_fields['D']);
465 msg->cm_fields['D'] = NULL;
467 if (msg->cm_fields['C'] != NULL) {
468 free(msg->cm_fields['C']);
469 msg->cm_fields['C'] = NULL;
472 /* save the message into a room */
473 if (PerformNetprocHooks(msg, target_room) == 0) {
474 msg->cm_flags = CM_SKIP_HOOKS;
475 CtdlSubmitMsg(msg, recp, target_room, 0);
477 CtdlFreeMessage(msg);
478 free_recipients(recp);
483 * Process a single message from a single file from the inbound queue
485 void network_process_message(FILE *fp,
488 HashList *working_ignetcfg,
489 HashList *the_netmap,
496 hold_pos = ftell(fp);
497 size = msgend - msgstart + 1;
498 buffer = malloc(size);
499 if (buffer != NULL) {
500 fseek(fp, msgstart, SEEK_SET);
501 if (fread(buffer, size, 1, fp) > 0) {
502 network_process_buffer(buffer,
511 fseek(fp, hold_pos, SEEK_SET);
516 * Process a single file from the inbound queue
518 void network_process_file(char *filename,
519 HashList *working_ignetcfg,
520 HashList *the_netmap,
523 struct CitContext *CCC = CC;
525 long msgstart = (-1L);
531 fp = fopen(filename, "rb");
533 QN_syslog(LOG_CRIT, "Error opening %s: %s\n", filename, strerror(errno));
537 fseek(fp, 0L, SEEK_END);
538 QN_syslog(LOG_INFO, "network: processing %ld bytes from %s\n", ftell(fp), filename);
541 /* Look for messages in the data stream and break them out */
542 while (ch = getc(fp), ch >= 0) {
545 if (msgstart >= 0L) {
547 network_process_message(fp,
561 if (msgstart >= 0L) {
562 network_process_message(fp,
576 * Process anything in the inbound queue
578 void network_do_spoolin(HashList *working_ignetcfg, HashList *the_netmap, int *netmap_changed)
580 struct CitContext *CCC = CC;
583 struct dirent *filedir_entry;
585 char filename[PATH_MAX];
586 static time_t last_spoolin_mtime = 0L;
591 * Check the spoolin directory's modification time. If it hasn't
592 * been touched, we don't need to scan it.
594 if (stat(ctdl_netin_dir, &statbuf)) return;
595 if (statbuf.st_mtime == last_spoolin_mtime) {
596 QNM_syslog(LOG_DEBUG, "network: nothing in inbound queue\n");
599 last_spoolin_mtime = statbuf.st_mtime;
600 QNM_syslog(LOG_DEBUG, "network: processing inbound queue\n");
603 * Ok, there's something interesting in there, so scan it.
605 dp = opendir(ctdl_netin_dir);
606 if (dp == NULL) return;
608 d = (struct dirent *)malloc(offsetof(struct dirent, d_name) + PATH_MAX + 1);
614 while ((readdir_r(dp, d, &filedir_entry) == 0) &&
615 (filedir_entry != NULL))
617 #ifdef _DIRENT_HAVE_D_NAMLEN
618 d_namelen = filedir_entry->d_namelen;
621 d_namelen = strlen(filedir_entry->d_name);
624 #ifdef _DIRENT_HAVE_D_TYPE
625 d_type = filedir_entry->d_type;
629 if ((d_namelen > 1) && filedir_entry->d_name[d_namelen - 1] == '~')
630 continue; /* Ignore backup files... */
632 if ((d_namelen == 1) &&
633 (filedir_entry->d_name[0] == '.'))
636 if ((d_namelen == 2) &&
637 (filedir_entry->d_name[0] == '.') &&
638 (filedir_entry->d_name[1] == '.'))
641 if (d_type == DT_UNKNOWN) {
649 filedir_entry->d_name);
651 if (lstat(path, &s) == 0) {
652 d_type = IFTODT(s.st_mode);
660 case DT_LNK: /* TODO: check whether its a file or a directory */
668 network_process_file(filename,
680 * Step 1: consolidate files in the outbound queue into one file per neighbor node
681 * Step 2: delete any files in the outbound queue that were for neighbors who no longer exist.
683 void network_consolidate_spoolout(HashList *working_ignetcfg, HashList *the_netmap)
685 struct CitContext *CCC = CC;
691 struct dirent *filedir_entry;
693 char spooloutfilename[PATH_MAX];
694 char filename[PATH_MAX];
695 const StrBuf *nexthop;
703 /* Step 1: consolidate files in the outbound queue into one file per neighbor node */
704 d = (struct dirent *)malloc(offsetof(struct dirent, d_name) + PATH_MAX + 1);
705 if (d == NULL) return;
707 dp = opendir(ctdl_netout_dir);
713 NextHop = NewStrBuf();
714 memset(&IOB, 0, sizeof(IOBuffer));
715 memset(&FDIO, 0, sizeof(FDIOBuffer));
718 while ((readdir_r(dp, d, &filedir_entry) == 0) &&
719 (filedir_entry != NULL))
721 #ifdef _DIRENT_HAVE_D_NAMLEN
722 d_namelen = filedir_entry->d_namelen;
725 d_namelen = strlen(filedir_entry->d_name);
728 #ifdef _DIRENT_HAVE_D_TYPE
729 d_type = filedir_entry->d_type;
733 if (d_type == DT_DIR)
736 if ((d_namelen > 1) && filedir_entry->d_name[d_namelen - 1] == '~')
737 continue; /* Ignore backup files... */
739 if ((d_namelen == 1) &&
740 (filedir_entry->d_name[0] == '.'))
743 if ((d_namelen == 2) &&
744 (filedir_entry->d_name[0] == '.') &&
745 (filedir_entry->d_name[1] == '.'))
748 pch = strchr(filedir_entry->d_name, '@');
756 filedir_entry->d_name);
759 filedir_entry->d_name,
760 pch - filedir_entry->d_name);
762 snprintf(spooloutfilename,
763 sizeof spooloutfilename,
768 QN_syslog(LOG_DEBUG, "Consolidate %s to %s\n", filename, ChrPtr(NextHop));
769 if (CtdlNetworkTalkingTo(SKEY(NextHop), NTT_CHECK)) {
772 "Currently online with %s - skipping for now\n",
780 const char *err = NULL;
781 CtdlNetworkTalkingTo(SKEY(NextHop), NTT_ADD);
783 infd = open(filename, O_RDONLY);
787 "failed to open %s for reading due to %s; skipping.\n",
788 filename, strerror(errno)
790 CtdlNetworkTalkingTo(SKEY(NextHop), NTT_REMOVE);
794 outfd = open(spooloutfilename,
795 O_EXCL|O_CREAT|O_NONBLOCK|O_WRONLY,
799 outfd = open(spooloutfilename,
800 O_EXCL|O_NONBLOCK|O_WRONLY,
806 "failed to open %s for reading due to %s; skipping.\n",
807 spooloutfilename, strerror(errno)
810 CtdlNetworkTalkingTo(SKEY(NextHop), NTT_REMOVE);
814 dsize = lseek(outfd, 0, SEEK_END);
815 lseek(outfd, -dsize, SEEK_SET);
817 fstat(infd, &statbuf);
818 fsize = statbuf.st_size;
820 fsize = lseek(infd, 0, SEEK_END);
823 FDIOBufferInit(&FDIO, &IOB, outfd, fsize + dsize);
824 FDIO.ChunkSendRemain = fsize;
825 FDIO.TotalSentAlready = dsize;
828 do {} while ((FileMoveChunked(&FDIO, &err) > 0) && (err == NULL));
835 "failed to append to %s [%s]; rolling back..\n",
836 spooloutfilename, strerror(errno)
838 /* whoops partial append?? truncate spooloutfilename again! */
839 ftruncate(outfd, dsize);
841 FDIOBufferDelete(&FDIO);
844 CtdlNetworkTalkingTo(SKEY(NextHop), NTT_REMOVE);
850 FreeStrBuf(&NextHop);
852 "skipping Spoolcleanup because of %d files unprocessed.\n",
859 /* Step 2: delete any files in the outbound queue that were for neighbors who no longer exist */
860 dp = opendir(ctdl_netout_dir);
862 FreeStrBuf(&NextHop);
867 while ((readdir_r(dp, d, &filedir_entry) == 0) &&
868 (filedir_entry != NULL))
870 #ifdef _DIRENT_HAVE_D_NAMLEN
871 d_namelen = filedir_entry->d_namelen;
874 d_namelen = strlen(filedir_entry->d_name);
877 #ifdef _DIRENT_HAVE_D_TYPE
878 d_type = filedir_entry->d_type;
882 if (d_type == DT_DIR)
885 if ((d_namelen == 1) &&
886 (filedir_entry->d_name[0] == '.'))
889 if ((d_namelen == 2) &&
890 (filedir_entry->d_name[0] == '.') &&
891 (filedir_entry->d_name[1] == '.'))
894 pch = strchr(filedir_entry->d_name, '@');
895 if (pch == NULL) /* no @ in name? consolidated file. */
899 filedir_entry->d_name,
900 pch - filedir_entry->d_name);
906 filedir_entry->d_name
909 i = CtdlIsValidNode(&nexthop,
915 if ( (i != 0) || (StrLength(nexthop) > 0) ) {
919 FreeStrBuf(&NextHop);
928 * It's ok if these directories already exist. Just fail silently.
930 void create_spool_dirs(void) {
931 if ((mkdir(ctdl_spool_dir, 0700) != 0) && (errno != EEXIST))
932 syslog(LOG_EMERG, "unable to create directory [%s]: %s", ctdl_spool_dir, strerror(errno));
933 if (chown(ctdl_spool_dir, CTDLUID, (-1)) != 0)
934 syslog(LOG_EMERG, "unable to set the access rights for [%s]: %s", ctdl_spool_dir, strerror(errno));
935 if ((mkdir(ctdl_netin_dir, 0700) != 0) && (errno != EEXIST))
936 syslog(LOG_EMERG, "unable to create directory [%s]: %s", ctdl_netin_dir, strerror(errno));
937 if (chown(ctdl_netin_dir, CTDLUID, (-1)) != 0)
938 syslog(LOG_EMERG, "unable to set the access rights for [%s]: %s", ctdl_netin_dir, strerror(errno));
939 if ((mkdir(ctdl_nettmp_dir, 0700) != 0) && (errno != EEXIST))
940 syslog(LOG_EMERG, "unable to create directory [%s]: %s", ctdl_nettmp_dir, strerror(errno));
941 if (chown(ctdl_nettmp_dir, CTDLUID, (-1)) != 0)
942 syslog(LOG_EMERG, "unable to set the access rights for [%s]: %s", ctdl_nettmp_dir, strerror(errno));
943 if ((mkdir(ctdl_netout_dir, 0700) != 0) && (errno != EEXIST))
944 syslog(LOG_EMERG, "unable to create directory [%s]: %s", ctdl_netout_dir, strerror(errno));
945 if (chown(ctdl_netout_dir, CTDLUID, (-1)) != 0)
946 syslog(LOG_EMERG, "unable to set the access rights for [%s]: %s", ctdl_netout_dir, strerror(errno));
952 CTDL_MODULE_INIT(network_spool)
956 CtdlREGISTERRoomCfgType(subpending, ParseSubPendingLine, 0, 5, SerializeGeneric, DeleteGenericCfgLine); /// todo: move this to mailinglist manager
957 CtdlREGISTERRoomCfgType(unsubpending, ParseUnSubPendingLine, 0, 4, SerializeGeneric, DeleteGenericCfgLine); /// todo: move this to mailinglist manager
958 CtdlREGISTERRoomCfgType(lastsent, ParseLastSent, 1, 1, SerializeLastSent, DeleteLastSent);
959 CtdlREGISTERRoomCfgType(ignet_push_share, ParseGeneric, 0, 2, SerializeGeneric, DeleteGenericCfgLine); // [remotenode|remoteroomname (optional)]// todo: move this to the ignet client
960 CtdlREGISTERRoomCfgType(listrecp, ParseGeneric, 0, 1, SerializeGeneric, DeleteGenericCfgLine);
961 CtdlREGISTERRoomCfgType(digestrecp, ParseGeneric, 0, 1, SerializeGeneric, DeleteGenericCfgLine);
962 CtdlREGISTERRoomCfgType(participate, ParseGeneric, 0, 1, SerializeGeneric, DeleteGenericCfgLine);
963 CtdlREGISTERRoomCfgType(roommailalias, ParseRoomAlias, 0, 1, SerializeGeneric, DeleteGenericCfgLine);
966 //////todo CtdlRegisterCleanupHook(destroy_network_queue_room);
968 return "network_spool";