2 * $Id: serv_test.c 3850 2005-09-13 14:00:24Z ajc $
15 #include <sys/types.h>
17 #if TIME_WITH_SYS_TIME
18 # include <sys/time.h>
22 # include <sys/time.h>
33 #include "sysdep_decls.h"
34 #include "citserver.h"
37 #include "serv_extensions.h"
46 #include "sieve2_error.h"
49 * We don't really care about dumping the entire credits to the log
50 * every time the server is initialized. The documentation will suffice
51 * for that purpose. We are making a call to sieve2_credits() in order
52 * to demonstrate that we have successfully linked in to libsieve.
54 void log_the_sieve2_credits(void) {
57 cred = strdup(sieve2_credits());
58 if (cred == NULL) return;
60 if (strlen(cred) > 60) {
61 strcpy(&cred[55], "...");
64 lprintf(CTDL_INFO, "%s\n",cred);
69 char *serv_sieve_init(void)
71 log_the_sieve2_credits();
72 return "$Id: serv_sieve.c 3850 2005-09-13 14:00:24Z ajc $";
75 #else /* HAVE_LIBSIEVE */
77 char *serv_sieve_init(void)
79 lprintf(CTDL_INFO, "This server is missing libsieve. Mailbox filtering will be disabled.\n");
80 return "$Id: serv_sieve.c 3850 2005-09-13 14:00:24Z ajc $";
83 #endif /* HAVE_LIBSIEVE */