aboutsummaryrefslogtreecommitdiffstats
path: root/plugin.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-09-30 13:34:59 +0200
committerJohannes Berg <johannes@sipsolutions.net>2007-09-30 13:34:59 +0200
commitd30cef3c11f07889c2f8e86340b013174d28fc5c (patch)
treeb4c935edff52f9829e1e8fd927a681596e26b4a8 /plugin.h
parent96730567e4a1fc835ed8a2c93988c2cacd1f914c (diff)
downloaddovecot-antispam-d30cef3c11f07889c2f8e86340b013174d28fc5c.tar.gz
dovecot-antispam-d30cef3c11f07889c2f8e86340b013174d28fc5c.tar.xz
dovecot-antispam-d30cef3c11f07889c2f8e86340b013174d28fc5c.zip
start of rewrite
Diffstat (limited to '')
-rw-r--r--plugin.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/plugin.h b/plugin.h
new file mode 100644
index 0000000..e55bd05
--- /dev/null
+++ b/plugin.h
@@ -0,0 +1,36 @@
+#ifndef _ANTISPAM_PLUGIN_H
+#define _ANTISPAM_PLUGIN_H
+
+#include <unistd.h>
+#include "mempool.h"
+
+struct signature {
+ struct signature *next;
+ char *sig;
+};
+
+#ifdef CONFIG_PLUGIN_WANT_SIGNATURE
+/*
+ * Call backend giving
+ * - pool: dovecot memory pool, will be freed afterwards
+ * - spam: whether mail comes from spam folder or not
+ * - sigs: signatures, next == NULL terminates list
+ * -
+ */
+int backend(pool_t pool, int spam, struct signature *sigs);
+#elif CONFIG_PLUGIN_WANT_MAIL
+#error TODO: no support for pristine training yet
+#else
+#error BUILD SYSTEM ERROR
+#endif
+
+#ifdef CONFIG_DEBUG
+void debug(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+#else
+static inline void
+debug(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)))
+{
+}
+#endif
+
+#endif /* _ANTISPAM_PLUGIN_H */