diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-09-30 13:34:59 +0200 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2007-09-30 13:34:59 +0200 |
commit | d30cef3c11f07889c2f8e86340b013174d28fc5c (patch) | |
tree | b4c935edff52f9829e1e8fd927a681596e26b4a8 /plugin.h | |
parent | 96730567e4a1fc835ed8a2c93988c2cacd1f914c (diff) | |
download | dovecot-antispam-d30cef3c11f07889c2f8e86340b013174d28fc5c.tar.gz dovecot-antispam-d30cef3c11f07889c2f8e86340b013174d28fc5c.tar.xz dovecot-antispam-d30cef3c11f07889c2f8e86340b013174d28fc5c.zip |
start of rewrite
Diffstat (limited to '')
-rw-r--r-- | plugin.h | 36 |
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 */ |