Commit Graph

142 Commits

Author SHA1 Message Date
Vsevolod Stakhov
b8211fbcc8 * Introduce new system of configuration checks:
- 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
2010-12-20 22:09:16 +03:00
Vsevolod Stakhov
ea03e94d0a Add registering options for lua modules
* Add ability to output colored messages for file and console loggers
2010-12-14 20:00:47 +03:00
Vsevolod Stakhov
dbc8bb8dbc Implement checking options for modules
Implement checking for classifier options
Fix redirector to handle timeouts and invalid replies properly
Fix surbl module not to check each url
2010-12-13 20:54:22 +03:00
Vsevolod Stakhov
618e3f4887 * Start new rspamd 0.3.4
* Add ability to manage per-module, per-worker and per-classifier options in XML parser
2010-12-03 21:57:38 +03:00
Vsevolod Stakhov
426963bff9 Write release id if rspamd is built from hg. 2010-12-03 17:09:00 +03:00
Vsevolod Stakhov
6b306ab875 Fixes types (use glib ones) no functional change.
Now all comments in commit logs beginning with '*' would be included in changelog, so
important changes would be separated from small ones.
2010-10-06 20:03:57 +04:00
Vsevolod Stakhov
07a2e0b3c8 * Many fixes to statfile syncronization system
* Fixed statfile pool initialization and synchronization with disk
2010-09-02 20:24:41 +04:00
Vsevolod Stakhov
f46e13b47c * Consider lua plugins errors as fatal configuration errors 2010-08-04 17:13:18 +04:00
Vsevolod Stakhov
6d12fe03df * Pre-init symbols cache when rereading config 2010-07-27 17:17:15 +04:00
Vsevolod Stakhov
c0b7a87e6a * Reopen log file by USR1 signal
* Add reopenlog method to FreeBSD rc script
2010-07-19 15:14:46 +04:00
Vsevolod Stakhov
698a6c0e76 * Make improvements to HTML entites decoder: now it replaces entities with common characters and
remove unknown entities. This behaviour is more like of standart HTML to text conversion
* Add -d option to force debug output
2010-07-16 18:40:56 +04:00
Vsevolod Stakhov
bae637bec8 * Fix stupid error with surbl module reconfig (another one, blame me)
* Do not show duplicate urls in url header
2010-07-05 16:57:55 +04:00
Vsevolod Stakhov
80e9384ebf * Pass env from main() arguments instead of platform specific global environ 2010-06-22 21:43:29 +04:00
Vsevolod Stakhov
e4977d9bfe * Get weights of symbol from default metric for symbols cache
* Fix setting task->from/task->rctp in smtp client
2010-06-18 16:40:47 +04:00
Vsevolod Stakhov
26eed5a540 * Implement initial version of greylisting triplets storage
* Fix issues with smtp worker
2010-06-17 20:25:48 +04:00
Vsevolod Stakhov
a639bf512e * Change metric logic
* 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
2010-06-16 20:43:26 +04:00
Vsevolod Stakhov
ae3eb4dfd7 * New symbols sorter:
- add ability to have dynamic rules inside items cache
  - make 3 types of rules: negative, dynamic and static
  - make logic of cache more simple by using glib lists instead of arrays
  - do checks of symbols in more logically correct way (negative->dynamic->static)
2010-05-28 20:31:10 +04:00
Vsevolod Stakhov
2a5690e7c1 * Continue implementing smtp proxy 2010-05-26 18:54:44 +04:00
Vsevolod Stakhov
5c523994ca * Dump grow factor to XML
* Insert classifiers parsed from xml config to config object
* Fix reinitializing of lua filters
2010-05-13 17:30:24 +04:00
Vsevolod Stakhov
7ae3070c49 * Low log level for debug messages 2010-05-13 17:08:12 +04:00
Vsevolod Stakhov
2a45f0daa2 * Fix config reloading
* Add ability to register variables in memory pools (hash with known lifetime)
* Avoid of using of some global variables
2010-05-13 17:07:20 +04:00
Vsevolod Stakhov
71d0d1657d * Add sample XML config
* Fix minor errors in logging initializing
* Fix installation of config files
2010-05-06 18:40:37 +04:00
Vsevolod Stakhov
02a6d987bb * Improve logging system:
- do not write many repeated messages to log
  - add process name to log line
* Small fixes to FreeBSD port and to start script as we have xml version now
* Reconfig modules while rereading config file
2010-04-27 18:43:22 +04:00
Vsevolod Stakhov
2d8eebcf7a * Bugfixes:
- handle '\' characters in lua strings correctly
  - fix lua initialization
  - avoid of using global lua state (global L)
  - fix listen sockets hash to allow multiply workers of same type but on different listen sockets
  - fix modules options inserting to allow multiply options of the same name
  - fix parsing of lua options
  - fix lua rules
2010-04-20 16:32:23 +04:00
Vsevolod Stakhov
d4b35de431 * Add lua config for most common rules
* Reset lua state while reloading
2010-04-13 19:37:29 +04:00
Vsevolod Stakhov
d2e2f5ec1a * Handle and dump factors correctly
* Many fixes to processes spawning
* Implement rereading of config
* Fix stupid yacc with its stupid global vars
2010-04-08 21:22:13 +04:00
Vsevolod Stakhov
e47778974a * Wellcome to the XML world 2010-04-07 19:56:23 +04:00
Vsevolod Stakhov
4405a019f6 * Add lua functions parsing for module options
* Add missing sections to XML parser (classifier, statfile, view, settings)
* Add missing params to XML parser
* Implement new commandline options parser (using glib)
* Set version to 0.3.0 as new rspamd would use new config system
2010-04-06 19:55:11 +04:00
Vsevolod Stakhov
42baae32bc * Add initial version of lua configuration system 2010-04-05 21:09:40 +04:00
Vsevolod Stakhov
6be82def71 * Add dumper to XML file (not all sections yet)
* Add checksum to config files
* Some config parsing reorganizations:
  - post_load_config should be called after xml initialization
  - xml state machine is corrected to read main section variables
  - some linting is added to xml (checking of elements parity)
2010-04-01 19:45:35 +04:00
cebka@lenovo-laptop
436f77da87 * Add support for Judy storage for fuzzy hashes 2010-03-22 18:41:35 +03:00
cebka@lenovo-laptop
bb5a1a9fb0 * Add maillist plugin for detecting mailmain/ezml and subscribe.ru lists 2010-02-01 20:01:20 +03:00
Vsevolod Stakhov
e413f4ee9c * Introduce new logging system:
- independent and customizeable buffering
  - line buffering
  - errors handling support
  - custom (ip based) debug
  - append function name automaticaly (based on __FUNCTION__)
  - add some logic to logs system
2009-12-22 01:32:18 +03:00
Vsevolod Stakhov
a079dac866 * Add ability to specify pid file from command line (for rc scripts)
* Do not use flock directly in pidfile handling
2009-12-21 19:21:37 +03:00
Vsevolod Stakhov
c6e6ea88a2 * Add limits support to each worker (max open files and max core size)
* Fix dependency on lex and yacc sources
2009-12-18 17:48:06 +03:00
Vsevolod Stakhov
9f300615e8 * Fix symbols cache (init lua filters before symbols cache initialization)
* Remove LRU expiration logic from statfiles and replace it with random/lowerest value expiration logic:
  expire random block or block with lowerest value

! statfiles are incompatible again
2009-12-14 19:03:43 +03:00
Vsevolod Stakhov
4dce4df796 * Adopt printf function from nginx for comfortable printing of some data types (fixed strings, pids etc)
* Fix work of http maps (they were broken in some places before)
* Fix sync of statfiles (not fully tested yet)
2009-11-30 19:26:06 +03:00
Vsevolod Stakhov
b37ea339a0 * SI_ code macroses are not BSD compatible, avoid using them 2009-11-05 18:13:07 +03:00
Vsevolod Stakhov
9b6b141a93 * Add more advanced signal processing routine 2009-11-05 18:09:54 +03:00
Vsevolod Stakhov
d78ac2d106 * Add ability to add maps from lua scripts and access theirs elements
* Add whitelist module for whitelisting score for some ip/from addresses
2009-11-02 19:37:06 +03:00
Vsevolod Stakhov
bb1b1f7889 * Implement new system of managing rspamd processes 2009-10-30 18:30:51 +03:00
Vsevolod Stakhov
1290cafef2 * Fix an issue with workers spawning
* Fix an issue with initializing radix lists in views
2009-10-29 19:45:35 +03:00
Vsevolod Stakhov
f3ad9c6f1e * Retab, no functional changes 2009-10-02 17:09:38 +04:00
Vsevolod Stakhov
16b6241644 * Cleanify logic of processes dispatcher 2009-09-21 15:18:54 +04:00
Vsevolod Stakhov
427315a198 * Fix -C flag with lua enabled 2009-09-16 17:07:16 +04:00
Vsevolod Stakhov
155f154d7a * Reorganze lua support in rspamd 2009-08-31 15:34:09 +04:00
Vsevolod Stakhov
52eacd5897 * Use buffered IO for logging 2009-08-25 16:47:55 +04:00
Vsevolod Stakhov
ab8f97db48 * Migrate fuzzy storage to use UDP instead of TCP 2009-08-25 15:13:24 +04:00
Vsevolod Stakhov
ca72f2d5e8 * Fix process dispatcher
* Use bloom filter in fuzzy storage
2009-08-20 19:13:45 +04:00
Vsevolod Stakhov
7ed8ac7bcb * Implement fuzzy hashes storage worker
TODO:
- implement client as rspamd plugin
- add support to controller and rspamc
- improve performance by avoiding usage of linked lists
2009-07-27 20:05:33 +04:00
Vsevolod Stakhov
be7df66484 * Fix some more bugs 2009-07-23 20:22:00 +04:00
Vsevolod Stakhov
3035b4fcc1 * Make modules disableable from config 2009-07-23 20:02:33 +04:00
Vsevolod Stakhov
ecc3b51cfd * Add http maps support 2009-07-21 18:50:45 +04:00
Vsevolod Stakhov
d52c26c9d3 * Fix stupid error with memory copying 2009-07-16 16:59:46 +04:00
Vsevolod Stakhov
2217589741 * Fix order of flags parsing 2009-07-15 13:05:11 +04:00
Vsevolod Stakhov
28fa4348d4 * Add -C flag to dump cache content
* Fix sorting logic
2009-07-15 12:40:36 +04:00
Vsevolod Stakhov
5f5254ff21 * Fix symbol planning, add cache_file directive to config file
* Fix some errors
2009-07-14 17:09:49 +04:00
Vsevolod Stakhov
a8cdd33ac7 * Rework the whole filters system
* Add metrics optimization and symbols cache
* Change all plugins

[DRAGONS]: not for production usage, some things are still not working!
2009-07-13 20:54:13 +04:00
Vsevolod Stakhov
bca226772e * Introduce new system of workers spawning and configuring, now rspamd can be easily extended by new types of wrokers
* Rework config system and avoid from using queue (3) lists
* Upgrade version to 0.2.0 as config format is now incompatible with older one
2009-06-17 19:31:48 +04:00
Vsevolod Stakhov
dc48e79c15 * Use own logging system to use static logging buffer instead of dynamically allocated one 2009-06-16 15:39:09 +04:00
Vsevolod Stakhov
e45ec9fd0e * Move event and gmime init to main 2009-05-05 17:01:35 +04:00
Vsevolod Stakhov
860feef97e * Enable counters interface
* Move modules configuration to init stage
2009-05-05 16:57:11 +04:00
Vsevolod Stakhov
3604753e01 * Fix shared hashes avoiding its resizing 2009-05-04 19:53:43 +04:00
Vsevolod Stakhov
05556b30f9 * Add counters for rspamd symbols
* Fix shared hashes
2009-05-04 18:55:12 +04:00
Vsevolod Stakhov
43f29d9dd1 * Fix daemon (3) call 2009-04-30 14:56:16 +04:00
Vsevolod Stakhov
6cb3a85919 * Enable gprof support 2009-04-29 16:37:03 +04:00
Vsevolod Stakhov
bf47a84713 * Fix variables substitution 2009-04-22 18:15:43 +04:00
Vsevolod Stakhov
6663e20a1a * Try to convert each text part of messages to utf8 to avoid problems with regexps 2009-04-15 16:24:55 +04:00
Vsevolod Stakhov
dd2fbb7a5b * Add message handling functions to lua API
* Add ability to add lua code in config with .lua and .endlua
* Add consolidation functions support that are written in perl or lua
2009-03-30 17:57:59 +04:00
Vsevolod Stakhov
89a83f2ef6 * Add initial LUA filters support 2009-03-27 18:30:40 +03:00
Vsevolod Stakhov
a83e5f18a2 * Add ability to build rspamd without perl support
* Fix creating of uinx socket
* Improve some build issues
2009-03-27 14:21:27 +03:00
Vsevolod Stakhov
e894cd18cf * Fix variable substitution
* Add new command line parameter '-V' allowing to dump all variables of rspamd
2009-03-24 12:46:41 +03:00
Vsevolod Stakhov
6088008d6c * With flag -t syntax of modules variables is also inspected
* Set "C" locale on start to avoid some troubles with logging
2009-03-19 12:25:14 +03:00
Vsevolod Stakhov
1085ddb9c0 * Fix reload logic
* Create listen sock for lmtp in main processes dispatcher to allow multiply lmtp workers
* Fix logic of logging
2009-03-13 18:03:29 +03:00
Vsevolod Stakhov
8ad17a5762 * Drop privilleges immideately after creating of listen socket 2009-03-04 12:50:40 +03:00
Vsevolod Stakhov
8956934199 * Add ability to fork multiply lmtp workers
* Add ability to drop privilleges of rspamd processes
* Add ability to install redirector with rspamd
* Add FreeBSD start scripts for rspamd and redirector
* Remove command line parsing from util.c as it has specific usage only in main process
2009-03-03 18:56:10 +03:00
Vsevolod Stakhov
5424cc32d4 * Unify socket creation and accepting by using utility functions
* Check SO_ERROR on socket immideately after connect/bind to avoid resourses allocation for
  unsuccessful connections
* Avoid descriptors leakage when we create sockets and have errors on them
* Set on all socket descriptors FD_CLOEXEC flag to avoid problems with executing LDA
2009-03-03 14:31:51 +03:00
Vsevolod Stakhov
3d6020ef1e * Remove %m from logging it seems to be unsupported by FreeBSD printf version 2009-03-02 16:43:01 +03:00
Vsevolod Stakhov
120980beba * Fix logging when process is starting
* Add -t option for config testing
* Try to search default config in install prefix not in current directory
2009-02-26 18:51:31 +03:00
Vsevolod Stakhov
1cd34f5283 * Add initial LMTP support and LDA delivery to rspamd 2009-02-24 20:16:53 +03:00
Vsevolod Stakhov
2dca592dce * Improve logger initialization 2009-02-18 19:52:42 +03:00
Vsevolod Stakhov
0fd2682e11 * Prepare to migrate to cmake (still need to write install target and working with XS implicitly)
* Move all system includes to one file where we detect availability of all that includes
* Fix license misprint
* Fix some issues with perl initializing
2009-02-16 19:50:18 +03:00
Vsevolod Stakhov
f2774fb0fa * Add BSD license text 2009-02-16 13:41:40 +03:00
Vsevolod Stakhov
39e66c0960 * Init perl and do all perl specific operations from the single place in code
* Push objects correctly to stack (by blessing them and making hash reference)
2009-02-13 17:03:43 +03:00
Vsevolod Stakhov
6c8fc71eaf * Add log function to perl API
* Prepare for more detailed work on rspamd perl API
2009-02-12 14:40:51 +03:00
Vsevolod Stakhov
ec5b7a84cf * Make surbl checks working 2009-01-26 19:27:30 +03:00
Vsevolod Stakhov
37d3605fa0 * Fix errors in learning implementation 2009-01-11 17:31:26 +03:00
Vsevolod Stakhov
f7639eb2dc * Implement delayed fork of dead workers (to avoid fork bombs)
* Implement refork of controller
* Log time to console in normal view
2009-01-11 12:39:37 +03:00
Vsevolod Stakhov
5f0da61541 * Make sample config more complete
* Fix bugs with config file parsing
* Fix bugs with creating sockets and reading commands
2008-12-18 20:31:21 +03:00
Vsevolod Stakhov
42b81716ec * Remove strlcpy code and replace it with glib alternative
* Polish code and remove bugs found
2008-12-03 19:48:15 +03:00
Vsevolod Stakhov
d62fb36650 * Add learning interface to rspamd (still requires classifier to work) 2008-12-02 19:58:28 +03:00
Vsevolod Stakhov
2aa9c74f1c * Reorganize structure of source files
* Adopt build system for new structure

--HG--
rename : cfg_file.h => src/cfg_file.h
rename : cfg_file.l => src/cfg_file.l
rename : cfg_file.y => src/cfg_file.y
rename : cfg_utils.c => src/cfg_utils.c
rename : controller.c => src/controller.c
rename : filter.c => src/filter.c
rename : filter.h => src/filter.h
rename : fstring.c => src/fstring.c
rename : fstring.h => src/fstring.h
rename : main.c => src/main.c
rename : main.h => src/main.h
rename : mem_pool.c => src/mem_pool.c
rename : mem_pool.h => src/mem_pool.h
rename : memcached-test.c => src/memcached-test.c
rename : memcached.c => src/memcached.c
rename : memcached.h => src/memcached.h
rename : perl.c => src/perl.c
rename : perl.h => src/perl.h
rename : plugins/regexp.c => src/plugins/regexp.c
rename : plugins/surbl.c => src/plugins/surbl.c
rename : protocol.c => src/protocol.c
rename : protocol.h => src/protocol.h
rename : upstream.c => src/upstream.c
rename : upstream.h => src/upstream.h
rename : url.c => src/url.c
rename : url.h => src/url.h
rename : util.c => src/util.c
rename : util.h => src/util.h
rename : worker.c => src/worker.c
2008-11-01 18:01:05 +03:00