]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
* Add forgotten file
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Mon, 2 Mar 2009 12:57:25 +0000 (15:57 +0300)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Mon, 2 Mar 2009 12:57:25 +0000 (15:57 +0300)
src/plugins/surbl.h [new file with mode: 0644]

diff --git a/src/plugins/surbl.h b/src/plugins/surbl.h
new file mode 100644 (file)
index 0000000..196f451
--- /dev/null
@@ -0,0 +1,69 @@
+#ifndef RSPAMD_MODULE_SURBL
+#define RSPAMD_MODULE_SURBL
+
+#include "../config.h"
+#include "../main.h"
+#include "../modules.h"
+#include "../cfg_file.h"
+#include "../memcached.h"
+
+#define DEFAULT_REDIRECTOR_PORT 8080
+#define DEFAULT_SURBL_WEIGHT 10
+#define DEFAULT_REDIRECTOR_CONNECT_TIMEOUT 1000
+#define DEFAULT_REDIRECTOR_READ_TIMEOUT 5000
+#define DEFAULT_SURBL_MAX_URLS 1000
+#define DEFAULT_SURBL_URL_EXPIRE 86400
+#define DEFAULT_SURBL_SYMBOL "SURBL_DNS"
+#define DEFAULT_SURBL_SUFFIX "multi.surbl.org"
+
+
+struct surbl_ctx {
+       int (*header_filter)(struct worker_task *task);
+       int (*mime_filter)(struct worker_task *task);
+       int (*message_filter)(struct worker_task *task);
+       int (*url_filter)(struct worker_task *task);
+       struct in_addr redirector_addr;
+       uint16_t redirector_port;
+       uint16_t weight;
+       unsigned int connect_timeout;
+       unsigned int read_timeout;
+       unsigned int max_urls;
+       unsigned int url_expire;
+       GList *suffixes;
+       char *symbol;
+       char *metric;
+       GHashTable *hosters;
+       GHashTable *whitelist;
+       unsigned use_redirector;
+       memory_pool_t *surbl_pool;
+};
+
+struct suffix_item {
+       const char *suffix;
+       const char *symbol;
+};
+
+struct dns_param {
+       struct uri *url;
+       struct worker_task *task;
+       struct suffix_item *suffix;
+};
+
+struct redirector_param {
+       struct uri *url;
+       struct worker_task *task;
+       enum {
+               STATE_CONNECT,
+               STATE_READ,
+       } state;
+       struct event ev;
+       int sock;
+};
+
+struct memcached_param {
+       struct uri *url;
+       struct worker_task *task;
+       memcached_ctx_t *ctx;
+};
+
+#endif