diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-06-18 22:07:28 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-06-18 22:07:28 +0400 |
commit | 9759175c6dcb897101db3528dc4f36e8c20639c1 (patch) | |
tree | 0452c2167c33c71990fc2713925d395e14651635 /src/plugins/surbl.h | |
parent | e4eb49311b06fc0f820fb64d800d15a295d190a6 (diff) | |
download | rspamd-9759175c6dcb897101db3528dc4f36e8c20639c1.tar.gz rspamd-9759175c6dcb897101db3528dc4f36e8c20639c1.zip |
* New logic of SURBL module:
- remove completely 2tld
- add option "exception"
- for domains from exception list check (level + 1) parts of url:
If we have url mail.some.com.ru and have com.ru in exception list
then we would check some.com.ru. If we have some.com.ru in exceptions
list them mail.some.com.ru would be checked and so on.
- optimized parsing of surbl requests
* Use system mkstemp(3) on systems where it is available as glib implementation
has poor security and generate rather predictable temporary file names.
Diffstat (limited to 'src/plugins/surbl.h')
-rw-r--r-- | src/plugins/surbl.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/surbl.h b/src/plugins/surbl.h index 7169e59a1..c38e2c16b 100644 --- a/src/plugins/surbl.h +++ b/src/plugins/surbl.h @@ -15,6 +15,7 @@ #define DEFAULT_SURBL_URL_EXPIRE 86400 #define DEFAULT_SURBL_SYMBOL "SURBL_DNS" #define DEFAULT_SURBL_SUFFIX "multi.surbl.org" +#define MAX_LEVELS 10 struct surbl_ctx { int (*filter)(struct worker_task *task); @@ -30,15 +31,11 @@ struct surbl_ctx { char *metric; const char *tld2_file; const char *whitelist_file; - GHashTable *tld2; + GHashTable **exceptions; GHashTable *whitelist; GHashTable *redirector_hosts; unsigned use_redirector; memory_pool_t *surbl_pool; - GRegex *extract_hoster_regexp; - GRegex *extract_normal_regexp; - GRegex *extract_ip_regexp; - GRegex *extract_numeric_regexp; }; struct suffix_item { |