$Log$
+ Revision 591.83 2002/08/08 02:49:12 ajc
+ * serv_network.c: retain unknown commands in netconfigs and write them back
+ * techdoc/netconfigs.txt: specify commands for subscribe/unsubscribe pending
+ * serv_listsub.c: added (currently a stub)
+
Revision 591.82 2002/08/06 03:12:14 ajc
* Fixed and clarified "new mail has arrived" messages.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
modules/libspam.la \
modules/libimap.la \
modules/libnetwork.la \
+ modules/liblistsub.la \
modules/libnetfilter.la \
modules/libpas2.la \
modules/libinetcfg.la \
serv_smtp.c serv_pop3.c internet_addressing.c parsedate.c genstamp.c \
$(DOMAIN) clientsocket.c serv_inetcfg.c serv_rwho.c serv_bio.c \
client_passwords.c imap_misc.c serv_netfilter.c serv_mrtg.c \
- serv_spam.c citadel_ipc.c \
+ serv_spam.c citadel_ipc.c serv_listsub.c \
serv_imap.c imap_tools.c imap_fetch.c imap_search.c imap_store.c \
serv_network.c serv_pas2.c serv_ical.c md5.c server_main.c
modules/libnetwork.la: serv_network.lo $(LIBTOOL) libcitserver.la
$(LTSHARE) -o libnetwork.la ../serv_network.lo ../libcitserver.la
+modules/liblistsub.la: serv_listsub.lo $(LIBTOOL) libcitserver.la
+ $(LTSHARE) -o liblistsub.la ../serv_listsub.lo ../libcitserver.la
+
modules/libnetfilter.la: serv_netfilter.lo $(LIBTOOL) libcitserver.la
$(LTSHARE) -o libnetfilter.la ../serv_netfilter.lo ../libcitserver.la
--- /dev/null
+/*
+ * $Id$
+ *
+ * This module handles self-service subscription/unsubscription to mail lists.
+ *
+ * Copyright (C) 2002 by Art Cancro and others.
+ * This code is released under the terms of the GNU General Public License.
+ *
+ */
+
+#include "sysdep.h"
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <signal.h>
+#include <pwd.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <dirent.h>
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+#include <sys/wait.h>
+#include <string.h>
+#include <limits.h>
+#include "citadel.h"
+#include "server.h"
+#include "sysdep_decls.h"
+#include "citserver.h"
+#include "support.h"
+#include "config.h"
+#include "dynloader.h"
+#include "room_ops.h"
+#include "user_ops.h"
+#include "policy.h"
+#include "database.h"
+#include "msgbase.h"
+#include "tools.h"
+#include "internet_addressing.h"
+#include "serv_network.h"
+#include "clientsocket.h"
+#include "file_ops.h"
+
+#ifndef HAVE_SNPRINTF
+#include "snprintf.h"
+#endif
+
+
+void cmd_subs(char *cmdbuf) {
+ cprintf("%d not yet implemented, dumbass...\n", ERROR);
+}
+
+
+/*
+ * Module entry point
+ */
+char *Dynamic_Module_Init(void)
+{
+ CtdlRegisterProtoHook(cmd_subs, "SUBS", "List subscribe/unsubscribe");
+ return "$Id$";
+}
FILE *fp;
struct SpoolControl sc;
struct namelist *nptr;
+ size_t miscsize = 0;
+ size_t linesize = 0;
lprintf(7, "Spooling <%s>\n", room_to_spool);
if (getroom(&CC->quickroom, room_to_spool) != 0) {
extract(nptr->name, buf, 1);
sc.ignet_push_shares = nptr;
}
+ else {
+ linesize = strlen(buf);
+ sc.misc = realloc(sc.misc,
+ (miscsize + linesize + 2) );
+ sprintf(&sc.misc[miscsize], "%s\n", buf);
+ miscsize = miscsize + linesize + 1;
+ }
}
phree(sc.ignet_push_shares);
sc.ignet_push_shares = nptr;
}
+ fwrite(sc.misc, strlen(sc.misc), 1, fp);
+ phree(sc.misc);
fclose(fp);
}
struct namelist *listrecps;
struct namelist *digestrecps;
struct namelist *ignet_push_shares;
+ char *misc;
FILE *digestfp;
int num_msgs_spooled;
};
(spooled). Conceptually, this node will have a corresponding record pushing
data in the other direction.
+
+ INSTRUCTION: subpending
+ SYNTAX: subpending|friko@mumjiboolean.com|listrecp|A234Z|1234567890
+ "Subscription pending" for the specified address. This means that
+someone has requested to subscribe an e-mail address (in this case,
+friko@mumjiboolean.com) to the list. The third parameter is either "listrecp"
+or "digestrecp" to specify a normal subscription or a digest subscription.
+The fourth parameter is an authentication token which is generated by the server
+and e-mailed to the specified address. When the user comes back and supplies
+this token, the subscription is complete. The fifth parameter is a simple
+timestamp, so that we may purge old records which were never confirmed.
+ INSTRUCTION: unsubpending
+ SYNTAX: unsubpending|friko@mumjiboolean.com|A234Z|1234567890
+ Similar to the 'subpending' command, except this one is for unsubscribe
+requests. The same rules apply with regard to the token.