diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-26 17:59:16 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-07-26 17:59:16 +0400 |
commit | 6bb0dd1d22e8217023e3f695c9a24c1d627e60d9 (patch) | |
tree | 5c292773f315d284d3a5bd3a31172845c983c4a7 | |
parent | d6625c5b603460aa485acc5d3ddd96a8b3c10858 (diff) | |
download | rspamd-6bb0dd1d22e8217023e3f695c9a24c1d627e60d9.tar.gz rspamd-6bb0dd1d22e8217023e3f695c9a24c1d627e60d9.zip |
Update a sample config file.0.4.1
Set version to 0.4.1.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | conf/rspamd-basic.xml.in | 65 | ||||
-rw-r--r-- | src/plugins/regexp.c | 4 | ||||
-rw-r--r-- | src/statfile.c | 4 |
4 files changed, 62 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ebc2ee847..667bd223b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT(rspamd C) SET(RSPAMD_VERSION_MAJOR 0) SET(RSPAMD_VERSION_MINOR 4) -SET(RSPAMD_VERSION_PATCH 0) +SET(RSPAMD_VERSION_PATCH 1) SET(RSPAMD_VERSION "${RSPAMD_VERSION_MAJOR}.${RSPAMD_VERSION_MINOR}.${RSPAMD_VERSION_PATCH}") diff --git a/conf/rspamd-basic.xml.in b/conf/rspamd-basic.xml.in index 3d7ba65be..7115199fa 100644 --- a/conf/rspamd-basic.xml.in +++ b/conf/rspamd-basic.xml.in @@ -49,7 +49,7 @@ <metric> <name>default</name> - <required_score>14.0</required_score> + <required_score>15.0</required_score> <!-- Sample actions --> <action>reject</action> <action>greylist:4</action> @@ -304,7 +304,6 @@ <bind_socket>localhost:11335</bind_socket> <count>1</count> <maxfiles>2048</maxfiles> - <maxcore>0</maxcore> <!-- Other params --> <hashfile>/var/run/rspamd/fuzzy.db</hashfile> <use_judy>yes</use_judy> @@ -314,16 +313,14 @@ <bind_socket>localhost:11334</bind_socket> <count>1</count> <maxfiles>2048</maxfiles> - <maxcore>0</maxcore> <!-- Other params --> <password>q1</password> </worker> <worker> <type>normal</type> <bind_socket>*:11333</bind_socket> - <count>1</count> + <count>2</count> <maxfiles>2048</maxfiles> - <maxcore>0</maxcore> <!-- Other params --> </worker> <!-- End of workers section --> @@ -364,6 +361,7 @@ <suffix_RAMBLER_URIBL>uribl.rambler.ru</suffix_RAMBLER_URIBL> <option name="suffix_%b_SURBL_MULTI">multi.surbl.org</option> <suffix_DBL>dbl.spamhaus.org</suffix_DBL> + <!-- Do not send ip urls to this URIBL --> <options_DBL>noip</options_DBL> <!-- Redirector sample setup --> <!-- @@ -384,14 +382,15 @@ <!-- whitelist --> <!-- Example of using HTTP maps for whitelisting <module name="whitelist"> - <ip_whitelist>http://cebka.pp.ru/stuff/grey_whitelist.conf</ip_whitelist> + <ip_whitelist>http://highsecure.ru/grey_whitelist.conf</ip_whitelist> <symbol_ip>WHITELIST_IP</symbol_ip> </module> --> <!-- chartable --> <module name="chartable"> - <threshold>0.1</threshold> + <!-- Division of symbols from different charsets to a total number of symbols --> + <threshold>0.3</threshold> <symbol>R_MIXED_CHARSET</symbol> </module> @@ -416,13 +415,19 @@ <!-- phishing --> <module name="phishing"> <symbol>PHISHING</symbol> - <!-- <domains>file://path/to/domains</domains> --> + <!-- Check phishing only for specified domains + <domains>file://path/to/domains</domains> + --> + <!-- If phishing detected for that domains insert another symbol specified after semicolon symbol + <strict_domains>file://path/to/domains:STRICT_PHISHING</strict_domains> + --> </module> <!-- Trie module --> <!-- <module name="trie"> - <option name="rule">TRIE1:bad pattern</option> + <rule>TRIE1:bad pattern</rule> + <rule>TRIE2:file:///var/run/rspamd/bad_patterns.list</rule> </module> --> @@ -433,13 +438,18 @@ <!-- SPF module setup --> <module name="spf"> + <!-- Cache setup for spf records to accelerate spf checks --> <spf_cache_size>2048</spf_cache_size> <spf_cache_expire>1d</spf_cache_expire> </module> +<!-- Regexp module configuration --> +<module name="regexp"> + <!-- Maximum size of text for regexp checks --> + <max_size>1M</max_size> +</module> <!-- End of modules section --> - <!-- Classifiers section --> <!-- <classifier type="winnow"> @@ -479,12 +489,47 @@ <binlog_master>localhost:11334</binlog_master> </statfile> </classifier> +--> + +<!-- Example of language specific statfiles --> +<!-- +<classifier type="bayes"> + <tokenizer>osb-text</tokenizer> + <metric>default</metric> + <min_tokens>10</min_tokens> + <max_tokens>1000</max_tokens> + <statfile> + <symbol>BAYES_HAM_RU</symbol> + <size>50M</size> + <path>/var/run/rspamd/bayes_ru.ham</path> + <param name="language">ru</param> + </statfile> + <statfile> + <symbol>BAYES_SPAM_RU</symbol> + <size>50M</size> + <path>/var/run/rspamd/bayes_ru.spam</path> + <param name="language">ru</param> + </statfile> + <statfile> + <symbol>BAYES_HAM</symbol> + <size>50M</size> + <path>/var/run/rspamd/bayes.ham</path> + </statfile> + <statfile> + <symbol>BAYES_SPAM</symbol> + <size>50M</size> + <path>/var/run/rspamd/bayes.spam</path> + </statfile> +</classifier> --> + +<!-- Ordinary statistic for a small mail system --> <classifier type="bayes"> <tokenizer>osb-text</tokenizer> <metric>default</metric> <min_tokens>10</min_tokens> + <max_tokens>1000</max_tokens> <statfile> <symbol>BAYES_HAM</symbol> <size>10M</size> diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index 04dd49566..3dbe2df6f 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -533,6 +533,10 @@ regexp_module_config (struct config_file *cfg) cur_opt = g_list_next (cur_opt); continue; } + else if (g_ascii_strncasecmp (cur->param, "max_size", sizeof ("max_size") - 1) == 0) { + cur_opt = g_list_next (cur_opt); + continue; + } cur_item = memory_pool_alloc0 (regexp_module_ctx->regexp_pool, sizeof (struct regexp_module_item)); cur_item->symbol = cur->param; if (cur->is_lua && cur->lua_type == LUA_VAR_STRING) { diff --git a/src/statfile.c b/src/statfile.c index 65da15033..215378749 100644 --- a/src/statfile.c +++ b/src/statfile.c @@ -332,14 +332,14 @@ statfile_pool_open (statfile_pool_t * pool, gchar *filename, size_t size, gboole } if (!forced && st.st_size > pool->max) { - msg_info ("cannot attach file to pool, too large: %z", (size_t) st.st_size); + msg_info ("cannot attach file to pool, too large: %Hz", (size_t) st.st_size); return NULL; } memory_pool_lock_mutex (pool->lock); if (!forced && abs (st.st_size - size) > sizeof (struct stat_file)) { memory_pool_unlock_mutex (pool->lock); - msg_warn ("need to reindex statfile old size: %z, new size: %z", st.st_size, size); + msg_warn ("need to reindex statfile old size: %Hz, new size: %Hz", st.st_size, size); return statfile_pool_reindex (pool, filename, st.st_size, size); } memory_pool_unlock_mutex (pool->lock); |