aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_config.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow adding maps without description from lua.Vsevolod Stakhov2014-08-231-3/+12
|
* Fix lua maps processing.Vsevolod Stakhov2014-08-201-1/+3
|
* Really allow to specify multiplier in return value.Vsevolod Stakhov2014-08-171-2/+11
|
* Improve lua callbacks call.Vsevolod Stakhov2014-08-171-4/+33
| | | | | | | | | | | | | | | | | | | Now it is possible to return a value from lua callback and rspamd can automatically insert the symbol corresponding. For example: rspamd_config.TEST = function(task) ... return true -- inserts symbol TEST with the default value ... return true, 0.5 -- inserts symbol TEST with 0.5 multiplier ... return true, "opt1", "opt2" -- insert symbol with the options specified ... return true, 0.5, "opt1", "opt2" ... end
* Forgot to initialize lua_State.Vsevolod Stakhov2014-08-171-0/+1
|
* Rework adding symbols from lua.Vsevolod Stakhov2014-08-171-190/+270
| | | | | | | | | | | | | | | It is now possible to use something like: rspamd_config.SYMBOL = function(task) ... end or even rspamd_config.SYMBOL = { callback = function(task) ... end, weight = '1.0', --optional priority = '0', --optional type = 'callback' --optional }
* Rework lua function names to avoid ambiguity.Vsevolod Stakhov2014-08-171-19/+19
|
* Add method to get any configuration key in lua.Vsevolod Stakhov2014-08-161-0/+27
|
* Unify style without sorting headers.Vsevolod Stakhov2014-07-231-160/+233
|
* Revert "Unify code style."Vsevolod Stakhov2014-07-231-235/+162
| | | | This reverts commit e0483657ff6cf1adc828ccce457814d61fe90a0d.
* Unify code style.Vsevolod Stakhov2014-07-231-162/+235
|
* Add `rspamd_config:add_map` lua function.Vsevolod Stakhov2014-07-221-0/+108
| | | | | | | | | | | | | This function is intended to create maps with lua callback that is called on map reading. For example: ``` local function cb(input) print(input) end rspamd_config:add_map('http://example.com/test.map', 'cool map`, cb) ```
* Adopt for the new lua ucl API.Vsevolod Stakhov2014-07-211-2/+2
|
* Refactor config API.Vsevolod Stakhov2014-04-301-20/+20
|
* Refactor worker task structure and API.Vsevolod Stakhov2014-04-211-14/+14
|
* Refactor memory pool naming.Vsevolod Stakhov2014-04-201-34/+34
|
* Deprecate xml config utilities finally.Vsevolod Stakhov2014-04-191-1/+0
|
* Adopt new libucl.Vsevolod Stakhov2014-04-191-2/+2
|
* Add function rspamd_config:register_symbolsVsevolod Stakhov2013-12-241-4/+51
| | | | | | Use the following syntax: rspamd_config:register_symbols(<callback>, [weight(optional)], 'symbol1', 'symbol2' ...)
* Remove unused xml code.Vsevolod Stakhov2013-11-161-44/+0
|
* Avoid endless recursion in export ucl to lua.Vsevolod Stakhov2013-10-271-2/+2
|
* Replace RCL to UCL from libucl to avoid duplicity in the code.Vsevolod Stakhov2013-10-221-3/+3
|
* Add an emitter from rcl object to lua.Vsevolod Stakhov2013-10-021-71/+9
|
* Adopt to lua 5.2.Vsevolod Stakhov2013-06-081-5/+5
|
* Add /maps and /getmap commands to webui.Vsevolod Stakhov2013-01-061-6/+9
| | | | | | Identify maps by id. Initialize secure random numbers using openssl. Add description to maps.
* Avoid global variables in map logic.Vsevolod Stakhov2012-09-191-3/+3
| | | | * Add support of simple maps like '/path/to/file' as it seems to be more comfortable than 'file:///...'
* Another debian license fix.Vsevolod Stakhov2012-09-101-1/+1
| | | | | Add apache license for regexp that were delivered from SpamAssassin project. Fix debian/copyright for src/dns.c.
* Update copyright (required by debian).Vsevolod Stakhov2012-09-041-3/+3
|
* * Rework thread pools locking logic to avoid global lua mutex usage.Vsevolod Stakhov2012-08-221-8/+0
| | | | | | Fixed several memory leaks with modern glib. Fixed memory leak in dkim code. Fixed a problem with static global variables in shared libraries.
* * Add lua worker type and lua worker bindings.Vsevolod Stakhov2012-07-261-0/+8
| | | | | | | * Add lua utility library for basic utils. * Fixes lua_buffer code. Fix lua loading error. Added some other lua utility functions.
* * Add async_session and memory pool objects lua bindings.Vsevolod Stakhov2012-07-091-0/+16
|
* * Implement pre-filters that realizes concepts to check mail by some ↵Vsevolod Stakhov2012-03-301-0/+57
| | | | | | | | absolute values like: - greylisting - DNS BL/WL - ratelimits
* * More things to be thread-safe:Vsevolod Stakhov2012-02-131-0/+6
| | | | | | | - pool allocator is now thread-safe - lua subsystem now holds lock to avoid lua stack corruption - events subsystem now using conditional variables to wait for async_threads - insert_result is thread-safe now
* * Now it is possible to specify local functions to every callback of rspamd ↵Vsevolod Stakhov2011-12-141-41/+125
| | | | | | | | | lua API, that will allow such things as passing different variables via lua closures mechanic. Use config pool for configuration allocation in lua API to avoid leaks on config reload.
* Fix critical bug with lua stack cleaning that caused heavy memory leaks.0.4.3Vsevolod Stakhov2011-08-121-3/+3
| | | | Update to 0.4.3.
* * Fix build under CentOS 5 with old glib 2.12Vsevolod Stakhov2011-07-291-7/+7
| | | | | * Fix build of rspamd with CMAKE_BINARY_DIR differs from CMAKE_SOURCE_DIR Rework include style.
* Add workaround for clang under linux.Vsevolod Stakhov2011-07-211-5/+5
| | | | Fix problems found by static analyzing.
* Fix trie text search.Vsevolod Stakhov2011-06-101-0/+7
|
* * Add new key-value mapVsevolod Stakhov2011-05-251-4/+36
| | | | | * Add lua api support for key-value map * Fix problem in lua configuration initialization to allow `rspamd_config' global work properly
* * Add strict priority rulesVsevolod Stakhov2011-03-181-0/+28
| | | | | * Improve and fix multimap module * Add rspamd_config object to stage of early configure of rspamd
* Fix trie in lua plugins.Vsevolod Stakhov2011-02-081-2/+10
|
* * Make trie plugin and fix trie lua APIVsevolod Stakhov2011-01-251-4/+17
|
* Fixes in classifying for small messages.Vsevolod Stakhov2011-01-251-1/+1
|
* * Add versions to lua APIVsevolod Stakhov2010-12-221-0/+9
| | | | * Provide compatibility for lua plugins for old versions of rspamd
* * Introduce new system of configuration checks:Vsevolod Stakhov2010-12-201-1/+44
| | | | | | | | - now symbols inside metrics definition must be inside rules as well - symbols may be virtual (e.g. when module can insert several symbols inside callback) - symbols may be pure callbacks (when symbol's name is unknown and depends on conditions) * Module 'emails' is removed as it is not used in the current rspamd MANY fixes to sample config files
* Add registering options for lua modulesVsevolod Stakhov2010-12-141-0/+53
| | | | * Add ability to output colored messages for file and console loggers
* Fixes types (use glib ones) no functional change.Vsevolod Stakhov2010-10-061-34/+34
| | | | | Now all comments in commit logs beginning with '*' would be included in changelog, so important changes would be separated from small ones.
* * Add trie interface to lua apiVsevolod Stakhov2010-09-221-0/+145
|
* * Add post filters to lua API - filters that would be called after all ↵Vsevolod Stakhov2010-08-251-1/+45
| | | | | | | | message's processing * Add ability to check for specified symbol in task results from lua * Add ability to check for metric's results from lua * Add ability to learn specified statfile form lua
* * Change metric logicVsevolod Stakhov2010-06-161-54/+6
| | | | | | | * Completely remove lex/yacc readers for config * Make common sense of metric/action and symbols * Sync changes with all plugins TODO: add this to documentation