serv_expire.o \
serv_vandelay.o \
serv_calendar.o \
+ serv_sieve.o \
serv_managesieve.o \
ical_dezonify.o \
serv_ldap.o \
serv_listsub.c serv_mrtg.c serv_netfilter.c serv_network.c \
serv_newuser.c serv_pas2.c serv_pop3.c serv_rwho.c serv_smtp.c \
serv_spam.c serv_test.c serv_mrtg.c serv_spam.c serv_upgrade.c \
- serv_vandelay.c serv_vcard.c serv_managesieve.c server_main.c setup.c snprintf.c \
+ serv_vandelay.c serv_vcard.c serv_managesieve.c server_main.c \
+ serv_sieve.c setup.c snprintf.c \
stress.c support.c sysdep.c tools.c user_ops.c userlist.c \
whobbs.c vcard.c serv_notes.c serv_fulltext.c ft_wordbreaker.c \
crc16.c journaling.c citadel_dirs.c
lprintf(CTDL_INFO, "%s\n", serv_fulltext_init());
lprintf(CTDL_INFO, "%s\n", serv_autocompletion_init());
lprintf(CTDL_INFO, "%s\n", serv_postfix_tcpdict());
-#ifdef HAVE_LIBSIEVE
- lprintf(CTDL_INFO, "%s\n", "FIXME do serv_libsieve_init() here");
-#endif
+ lprintf(CTDL_INFO, "%s\n", serv_sieve_init());
lprintf(CTDL_INFO, "%s\n", serv_managesieve_init());
}
--- /dev/null
+/*
+ * $Id: serv_test.c 3850 2005-09-13 14:00:24Z ajc $
+ *
+ *
+ */
+
+#include "sysdep.h"
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <pwd.h>
+#include <errno.h>
+#include <sys/types.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 "serv_extensions.h"
+#include "room_ops.h"
+#include "policy.h"
+#include "database.h"
+#include "msgbase.h"
+
+#ifdef HAVE_LIBSIEVE
+
+#include "sieve2.h"
+#include "sieve2_error.h"
+
+/**
+ * We don't really care about dumping the entire credits to the log
+ * every time the server is initialized. The documentation will suffice
+ * for that purpose. We are making a call to sieve2_credits() in order
+ * to demonstrate that we have successfully linked in to libsieve.
+ */
+void log_the_sieve2_credits(void) {
+ char *cred = NULL;
+ char *ptr;
+
+ cred = strdup(sieve2_credits());
+ if (cred == NULL) return;
+
+ if (strlen(cred) > 60) {
+ strcpy(&cred[55], "...");
+ }
+
+ lprintf(CTDL_INFO, "%s\n",cred);
+ free(cred);
+}
+
+
+char *serv_sieve_init(void)
+{
+ log_the_sieve2_credits();
+ return "$Id: serv_sieve.c 3850 2005-09-13 14:00:24Z ajc $";
+}
+
+#else /* HAVE_LIBSIEVE */
+
+char *serv_sieve_init(void)
+{
+ lprintf(CTDL_INFO, "This server is missing libsieve. Mailbox filtering will be disabled.\n");
+ return "$Id: serv_sieve.c 3850 2005-09-13 14:00:24Z ajc $";
+}
+
+#endif /* HAVE_LIBSIEVE */