]> source.dussan.org Git - rspamd.git/log
rspamd.git
9 years agoFix `register_symbols` lua function.
Vsevolod Stakhov [Sat, 22 Nov 2014 16:15:56 +0000 (16:15 +0000)]
Fix `register_symbols` lua function.

9 years agoAllow to disable components of hfilter.
Vsevolod Stakhov [Fri, 21 Nov 2014 15:40:29 +0000 (15:40 +0000)]
Allow to disable components of hfilter.

9 years agoRework `register_symbols` function.
Vsevolod Stakhov [Fri, 21 Nov 2014 15:39:04 +0000 (15:39 +0000)]
Rework `register_symbols` function.

9 years agoRework spf module.
Vsevolod Stakhov [Fri, 21 Nov 2014 14:22:06 +0000 (14:22 +0000)]
Rework spf module.

- Copy data to memory pool as cached record might be destroyed causing
  freed memory being passed to the protocol output (use after free).
- Allow SPF_NEUTRAL policy to be handled separately.
- Add R_SPF_NEUTRAL to the default config.

9 years agoFix indentation in hfilter.
Vsevolod Stakhov [Fri, 21 Nov 2014 14:02:31 +0000 (14:02 +0000)]
Fix indentation in hfilter.

9 years agoFix PTR resolving in lua resolver.
Vsevolod Stakhov [Fri, 21 Nov 2014 12:45:29 +0000 (12:45 +0000)]
Fix PTR resolving in lua resolver.

9 years agoFix leaking of iconv descriptors.
Vsevolod Stakhov [Fri, 21 Nov 2014 12:12:35 +0000 (12:12 +0000)]
Fix leaking of iconv descriptors.

9 years agoAnother try to fix race condition in the upstreams.
Vsevolod Stakhov [Fri, 21 Nov 2014 10:58:11 +0000 (10:58 +0000)]
Another try to fix race condition in the upstreams.

9 years agoUse more proper hashing for fuzzy.
Vsevolod Stakhov [Thu, 20 Nov 2014 15:28:55 +0000 (15:28 +0000)]
Use more proper hashing for fuzzy.

9 years agoAdd fuzzy hash utilities.
Vsevolod Stakhov [Thu, 20 Nov 2014 15:27:07 +0000 (15:27 +0000)]
Add fuzzy hash utilities.

9 years agoFix fuzzy hashes addding.
Vsevolod Stakhov [Wed, 19 Nov 2014 17:24:36 +0000 (17:24 +0000)]
Fix fuzzy hashes addding.

9 years agoRework DKIM canonization to line based.
Vsevolod Stakhov [Wed, 19 Nov 2014 16:30:13 +0000 (16:30 +0000)]
Rework DKIM canonization to line based.

9 years agoFix raw vs parsed reperesentations.
Vsevolod Stakhov [Wed, 19 Nov 2014 15:19:49 +0000 (15:19 +0000)]
Fix raw vs parsed reperesentations.

Raw parts are now:
- decoded b64/qp, but *NOT* converted to utf-8

Processed parts are now:
- converted to UTF-8
- normalized if needed (e.g. HTML tags are stripped)

9 years agoOne more try to fix dkim border issues.
Vsevolod Stakhov [Wed, 19 Nov 2014 15:06:51 +0000 (15:06 +0000)]
One more try to fix dkim border issues.

9 years agoDo not include \0 into length of text.
Vsevolod Stakhov [Wed, 19 Nov 2014 14:39:44 +0000 (14:39 +0000)]
Do not include \0 into length of text.

9 years agoFix logic of finding URLs in HTML parts.
Vsevolod Stakhov [Wed, 19 Nov 2014 14:24:03 +0000 (14:24 +0000)]
Fix logic of finding URLs in HTML parts.

9 years agoDecode entitles when normalizing HTML parts.
Vsevolod Stakhov [Wed, 19 Nov 2014 14:19:50 +0000 (14:19 +0000)]
Decode entitles when normalizing HTML parts.

9 years agoTry to fix hang in upstream events.
Vsevolod Stakhov [Wed, 19 Nov 2014 13:16:06 +0000 (13:16 +0000)]
Try to fix hang in upstream events.

9 years agoReturn nil if header was not found in lua_task.
Vsevolod Stakhov [Wed, 19 Nov 2014 12:28:24 +0000 (12:28 +0000)]
Return nil if header was not found in lua_task.

9 years agoFix ping command.
Vsevolod Stakhov [Tue, 18 Nov 2014 14:55:50 +0000 (14:55 +0000)]
Fix ping command.

9 years agoApply boundary fix for dkim simple canonization.
Vsevolod Stakhov [Tue, 18 Nov 2014 14:27:35 +0000 (14:27 +0000)]
Apply boundary fix for dkim simple canonization.

9 years agoRelease 0.7.5 0.7.5
Vsevolod Stakhov [Mon, 17 Nov 2014 13:22:35 +0000 (13:22 +0000)]
Release 0.7.5

* Fix owner when creating folder /run/rspamd (by @sfirmery)
* Fix IP validity checks
* Decode URLs obtained from HTML tags
* Fix crash with unweighted upstreams
* Stop processing headers in parts
* Set sockaddr.sa_family properly when connectig to upstreams
* Fix reload issues in surbl and fuzzy_check (reported by @citrin)
* Fix timeouts in redirector
* Improve lua errors reporting
* Fix lua closures processing in libucl
* Rework calling of lua functions from regexp module
* Choose raw regexp for raw headers
* Rework conversion to utf since glib one is broken
* Ignore SGML style tags in html
* Fix old bug with non-capturing https urls
* Fix memory corruption on fuzzy reload (reported by @citrin)
* Fix percents display in rspamc
* Fix buffer update for DKIM
* Do not validate utf for raw headers

Signed-off-by: Vsevolod Stakhov <vsevolod@highsecure.ru>
9 years agoDo not validate utf for raw headers.
Vsevolod Stakhov [Mon, 17 Nov 2014 11:48:27 +0000 (11:48 +0000)]
Do not validate utf for raw headers.

9 years agoRemove unused function.
Vsevolod Stakhov [Sun, 16 Nov 2014 23:16:40 +0000 (23:16 +0000)]
Remove unused function.

9 years agoImprove dkim debug log.
Vsevolod Stakhov [Sat, 15 Nov 2014 19:50:19 +0000 (19:50 +0000)]
Improve dkim debug log.

9 years agoFix buffer update for DKIM.
Vsevolod Stakhov [Sat, 15 Nov 2014 19:49:29 +0000 (19:49 +0000)]
Fix buffer update for DKIM.

Sometimes this procedure was able to split \r\n in messages which in
turn led to DKIM checks failures.

9 years agoFix percents display in rspamc.
Vsevolod Stakhov [Fri, 14 Nov 2014 15:53:34 +0000 (15:53 +0000)]
Fix percents display in rspamc.

9 years agoFix memory corruption on fuzzy reload.
Vsevolod Stakhov [Fri, 14 Nov 2014 15:32:29 +0000 (15:32 +0000)]
Fix memory corruption on fuzzy reload.

Reported by: @citrin

9 years agoFix old bug with non-capturing https urls.
Vsevolod Stakhov [Fri, 14 Nov 2014 15:10:51 +0000 (15:10 +0000)]
Fix old bug with non-capturing https urls.

9 years agoIgnore SGML style tags in html.
Vsevolod Stakhov [Fri, 14 Nov 2014 15:08:02 +0000 (15:08 +0000)]
Ignore SGML style tags in html.

9 years agoRework conversion to utf since glib is broken.
Vsevolod Stakhov [Fri, 14 Nov 2014 14:18:01 +0000 (14:18 +0000)]
Rework conversion to utf since glib is broken.

9 years agoUpdate version to 0.7.5.
Vsevolod Stakhov [Thu, 13 Nov 2014 22:22:41 +0000 (22:22 +0000)]
Update version to 0.7.5.

9 years agoChoose raw regexp for raw headers.
Vsevolod Stakhov [Wed, 12 Nov 2014 18:18:00 +0000 (18:18 +0000)]
Choose raw regexp for raw headers.

9 years agoRework calling of lua functions from regexp module.
Vsevolod Stakhov [Wed, 12 Nov 2014 16:32:58 +0000 (16:32 +0000)]
Rework calling of lua functions from regexp module.

9 years agoSync libucl.
Vsevolod Stakhov [Wed, 12 Nov 2014 16:24:27 +0000 (16:24 +0000)]
Sync libucl.

9 years agoBe more informative about lua errors.
Vsevolod Stakhov [Tue, 11 Nov 2014 17:36:03 +0000 (17:36 +0000)]
Be more informative about lua errors.

9 years agoFix timeouts in redirector.
Vsevolod Stakhov [Tue, 11 Nov 2014 17:27:14 +0000 (17:27 +0000)]
Fix timeouts in redirector.

9 years agoFix reload issues in surbl and fuzzy_check.
Vsevolod Stakhov [Tue, 11 Nov 2014 17:13:37 +0000 (17:13 +0000)]
Fix reload issues in surbl and fuzzy_check.

9 years agoSet AF properly in one more place.
Vsevolod Stakhov [Tue, 11 Nov 2014 17:13:25 +0000 (17:13 +0000)]
Set AF properly in one more place.

9 years agoSet sockaddr.sa_family properly.
Vsevolod Stakhov [Tue, 11 Nov 2014 16:15:04 +0000 (16:15 +0000)]
Set sockaddr.sa_family properly.

9 years agoRemove unused variable.
Vsevolod Stakhov [Tue, 11 Nov 2014 15:59:02 +0000 (15:59 +0000)]
Remove unused variable.

9 years agoStop processing headers in parts.
Vsevolod Stakhov [Tue, 11 Nov 2014 15:58:03 +0000 (15:58 +0000)]
Stop processing headers in parts.

9 years agoFix crash with unweighted upstreams.
Vsevolod Stakhov [Tue, 11 Nov 2014 15:54:18 +0000 (15:54 +0000)]
Fix crash with unweighted upstreams.

9 years agoDecode URL obtained from HTML tags.
Vsevolod Stakhov [Tue, 11 Nov 2014 13:01:16 +0000 (13:01 +0000)]
Decode URL obtained from HTML tags.

9 years agoFix IP validity checks.
Vsevolod Stakhov [Mon, 10 Nov 2014 23:21:14 +0000 (23:21 +0000)]
Fix IP validity checks.

9 years agoMerge pull request #114 from sfirmery/master
Vsevolod Stakhov [Mon, 10 Nov 2014 22:01:35 +0000 (22:01 +0000)]
Merge pull request #114 from sfirmery/master

Fix owner when creating folder /run/rspamd in Debian init script

9 years agoFix owner when creating folder /run/rspamd 114/head
Sylvain Firmery [Sat, 8 Nov 2014 19:05:54 +0000 (20:05 +0100)]
Fix owner when creating folder /run/rspamd

9 years agoRelease 0.7.4 0.7.4
Vsevolod Stakhov [Sat, 8 Nov 2014 19:01:31 +0000 (19:01 +0000)]
Release 0.7.4

* Fix build under *BSD
* Detect HAN unicode script
* Implement language detection heuristic for text parts
* Fix time output in history
* Improve piechart coloring
* Fix \r\n conversion in DKIM module (reported by @citrin)
* Try to detect systems with no IPv6 support
* Fix multiple/single values in use settings (reported by @citrin)
*  Rework IP addresses in upstreams:
- Select ipv4/unix addresses if they exist and use ipv6 for ipv6 only
    upstreams (since the support of ipv6 is poor in many OSes and
    environments)
- Free IP list on upstream destruction
- Add test cases for addresses selection
- Allow adding of free form IP addresses to upstreams
* Fix endiannes in lua_radix search (reported by @citrin)
* Soft shutdown should also set wanna_die flag (reported by @citrin)
* Stop use-after-free in event loop termination
* Fix processing of very short messages in DKIM (reported by @citrin)
* Detect systems without shared mutexes
* Fix issues with PTR and MX elements in SPF parser (reported by @citrin)

Signed-off-by: Vsevolod Stakhov <vsevolod@highsecure.ru>
9 years agoImprove coloring.
Vsevolod Stakhov [Sat, 8 Nov 2014 18:31:18 +0000 (18:31 +0000)]
Improve coloring.

9 years agoUpdate versions.
Vsevolod Stakhov [Sat, 8 Nov 2014 16:15:47 +0000 (16:15 +0000)]
Update versions.

9 years agoUpdate version to 0.7.4.
Vsevolod Stakhov [Sat, 8 Nov 2014 15:53:44 +0000 (15:53 +0000)]
Update version to 0.7.4.

9 years agoMerge pull request #113 from citrin/master
Vsevolod Stakhov [Sat, 8 Nov 2014 18:37:53 +0000 (18:37 +0000)]
Merge pull request #113 from citrin/master

Fix typo in symbol description.

9 years agoTry to detect systems without shared mutexes.
Vsevolod Stakhov [Sat, 8 Nov 2014 15:46:03 +0000 (15:46 +0000)]
Try to detect systems without shared mutexes.

9 years agoFix processing of very short messages in DKIM.
Vsevolod Stakhov [Fri, 7 Nov 2014 17:08:41 +0000 (17:08 +0000)]
Fix processing of very short messages in DKIM.

Reported by: @citrin

9 years agoAnother fix for PTR records in SPF.
Vsevolod Stakhov [Fri, 7 Nov 2014 16:00:59 +0000 (16:00 +0000)]
Another fix for PTR records in SPF.

9 years agoStop use-after-free in event loop termination.
Vsevolod Stakhov [Fri, 7 Nov 2014 15:08:09 +0000 (15:08 +0000)]
Stop use-after-free in event loop termination.

9 years agoSoft shutdown should also set wanna_die flag.
Vsevolod Stakhov [Fri, 7 Nov 2014 14:36:10 +0000 (14:36 +0000)]
Soft shutdown should also set wanna_die flag.

9 years agoFix endiannes in lua_radix search.
Vsevolod Stakhov [Fri, 7 Nov 2014 14:22:12 +0000 (14:22 +0000)]
Fix endiannes in lua_radix search.

9 years agoRework IP addresses in upstreams.
Vsevolod Stakhov [Fri, 7 Nov 2014 13:33:45 +0000 (13:33 +0000)]
Rework IP addresses in upstreams.

- Select ipv4/unix addresses if they exist and use ipv6 for ipv6 only
  upstreams (since the support of ipv6 is poor in many OSes and
  environments).
- Free IP list on upstream destruction.
- Add test cases for addresses selection.
- Allow adding of free form IP addresses to upstreams.

9 years agoFix multiple/single values in use settings.
Vsevolod Stakhov [Fri, 7 Nov 2014 11:00:18 +0000 (11:00 +0000)]
Fix multiple/single values in use settings.

Reported by: @citrin

9 years agoTry to detect systems with no IPv6 support.
Vsevolod Stakhov [Thu, 6 Nov 2014 22:54:31 +0000 (22:54 +0000)]
Try to detect systems with no IPv6 support.

9 years agoFix typo in symbol description. 113/head
Anton Yuzhaninov [Wed, 5 Nov 2014 18:32:32 +0000 (21:32 +0300)]
Fix typo in symbol description.

9 years agoDisable extra debug.
Vsevolod Stakhov [Wed, 5 Nov 2014 16:14:23 +0000 (16:14 +0000)]
Disable extra debug.

9 years agoMore fixes to dkim \r\n converting.
Vsevolod Stakhov [Wed, 5 Nov 2014 16:12:03 +0000 (16:12 +0000)]
More fixes to dkim \r\n converting.

Found by: @citrin

9 years agoFix \r\n conversion in DKIM module.
Vsevolod Stakhov [Wed, 5 Nov 2014 15:27:34 +0000 (15:27 +0000)]
Fix \r\n conversion in DKIM module.

9 years agoImprove piechart coloring.
Vsevolod Stakhov [Tue, 4 Nov 2014 13:52:53 +0000 (13:52 +0000)]
Improve piechart coloring.

9 years agoFix time output in history.
Vsevolod Stakhov [Tue, 4 Nov 2014 13:14:41 +0000 (13:14 +0000)]
Fix time output in history.

9 years agoDetect language heuristic for text parts.
Vsevolod Stakhov [Tue, 4 Nov 2014 12:51:55 +0000 (12:51 +0000)]
Detect language heuristic for text parts.

9 years agoDetect HAN unicode script.
Vsevolod Stakhov [Tue, 4 Nov 2014 12:32:49 +0000 (12:32 +0000)]
Detect HAN unicode script.

9 years agoFix stupid error for FreeBSD build.
Vsevolod Stakhov [Mon, 3 Nov 2014 12:47:50 +0000 (12:47 +0000)]
Fix stupid error for FreeBSD build.

9 years agoRelease 0.7.3. 0.7.3
Vsevolod Stakhov [Mon, 3 Nov 2014 12:23:36 +0000 (12:23 +0000)]
Release 0.7.3.

* New upstreams code:
- simplify upstreams API;
- unify strings parsing in upstreams definition;
- add configuration options for the upstreams;
- for failed upstreams re-resolve their addresses;
- use all resolved addresses for an upstream (round-robin);
- implement stable hashing and use it by default for upstreams;
- add unit test for upstreams module.
* Rework signals processing in all rspamd workers:
- signals are now processed in the event loop;
- implement the most common signal handlers for all workers;
- add callbacks for workers specific signal handlers
*  Fix critical issue with fuzzy storage:
Fuzzy stroage could not save any hashes on termination due to bugged
signals handling
* Fix roll history IP storage
* Rework ipv4/ipv6 handling in parsing addresses:
    - turn off support of IPV6_V6ONLY socket option;
    - create ipv6 socket prior to ipv4 one to handle systems with v6/v4
    sockets enabled (Linux)
* Remove CBL as it's wholly included in Spamhaus XBL (by @fatalbanana)
* Remove nszones.com fake RBL (by @citrin)
* Fix upstreams interaction for fuzzy_check
* Verify spf PTR records (reported by @citrin)
* Fix spf MX records parsing
* Add compatibility for old libevent (by @yellowman)
* Sync bugfixes from libucl

Signed-off-by: Vsevolod Stakhov <vsevolod@highsecure.ru>
9 years agoImprove upstream tests.
Vsevolod Stakhov [Mon, 3 Nov 2014 11:41:07 +0000 (11:41 +0000)]
Improve upstream tests.

9 years agoFix tv_to_msec macro priority.
Vsevolod Stakhov [Mon, 3 Nov 2014 10:54:44 +0000 (10:54 +0000)]
Fix tv_to_msec macro priority.

9 years agoConfigure upstreams in workers.
Vsevolod Stakhov [Mon, 3 Nov 2014 10:23:32 +0000 (10:23 +0000)]
Configure upstreams in workers.

9 years agoParse unsigned integers in the configuration.
Vsevolod Stakhov [Mon, 3 Nov 2014 10:23:13 +0000 (10:23 +0000)]
Parse unsigned integers in the configuration.

9 years agoUse upstreams configuration.
Vsevolod Stakhov [Mon, 3 Nov 2014 10:19:13 +0000 (10:19 +0000)]
Use upstreams configuration.

9 years agoAdd upstreams configuration.
Vsevolod Stakhov [Mon, 3 Nov 2014 10:18:55 +0000 (10:18 +0000)]
Add upstreams configuration.

9 years agoAdd consistent hash test.
Vsevolod Stakhov [Sun, 2 Nov 2014 21:42:53 +0000 (21:42 +0000)]
Add consistent hash test.

P value is calculated as following:
when we add/remove M upstreams from the list, the probability of hash
miss should be close to the relation N / (N + M), where N is the size of
the previous upstreams list.

So far, the algorithm described in http://arxiv.org/abs/1406.2294 shows
p value more than 0.99.

9 years agoSome more fixes to the test.
Vsevolod Stakhov [Sun, 2 Nov 2014 19:03:15 +0000 (19:03 +0000)]
Some more fixes to the test.

9 years agoFix some upstream issues.
Vsevolod Stakhov [Sun, 2 Nov 2014 18:55:24 +0000 (18:55 +0000)]
Fix some upstream issues.

9 years agoAdd a simple upstreams test.
Vsevolod Stakhov [Sun, 2 Nov 2014 18:38:43 +0000 (18:38 +0000)]
Add a simple upstreams test.

9 years agoRemove old radix tests.
Vsevolod Stakhov [Sun, 2 Nov 2014 17:39:45 +0000 (17:39 +0000)]
Remove old radix tests.

9 years agoUpdate version to 0.7.3
Vsevolod Stakhov [Sun, 2 Nov 2014 17:19:00 +0000 (17:19 +0000)]
Update version to 0.7.3

9 years agoUse PTHREAD_PROCESS_SHARED mutexes if possible.
Vsevolod Stakhov [Sat, 1 Nov 2014 22:11:15 +0000 (22:11 +0000)]
Use PTHREAD_PROCESS_SHARED mutexes if possible.

9 years agoUse process-level mutex to avoid log races.
Vsevolod Stakhov [Sat, 1 Nov 2014 17:52:15 +0000 (17:52 +0000)]
Use process-level mutex to avoid log races.

9 years agoFix critical issue with fuzzy storage.
Vsevolod Stakhov [Sat, 1 Nov 2014 17:22:55 +0000 (17:22 +0000)]
Fix critical issue with fuzzy storage.

Fuzzy stroage could not save any hashes on termination due to bugged
signals handling.

Reported by: at0r at #rspamd

9 years agoFix signals initializing.
Vsevolod Stakhov [Sat, 1 Nov 2014 17:22:45 +0000 (17:22 +0000)]
Fix signals initializing.

9 years agoAdd post-signal handler.
Vsevolod Stakhov [Sat, 1 Nov 2014 17:05:35 +0000 (17:05 +0000)]
Add post-signal handler.

9 years agoRework signals processing in workers.
Vsevolod Stakhov [Sat, 1 Nov 2014 16:41:38 +0000 (16:41 +0000)]
Rework signals processing in workers.

9 years agoUse constant for hash seed for upstreams selection.
Vsevolod Stakhov [Sat, 1 Nov 2014 15:18:48 +0000 (15:18 +0000)]
Use constant for hash seed for upstreams selection.

9 years agoAdd jitter for upstream reviving.
Vsevolod Stakhov [Sat, 1 Nov 2014 15:18:33 +0000 (15:18 +0000)]
Add jitter for upstream reviving.

9 years agoFix some issues in the upstream code.
Vsevolod Stakhov [Fri, 31 Oct 2014 12:14:32 +0000 (12:14 +0000)]
Fix some issues in the upstream code.

9 years agoFix roll history IP storage.
Vsevolod Stakhov [Fri, 31 Oct 2014 11:46:48 +0000 (11:46 +0000)]
Fix roll history IP storage.

9 years agoFix upstreams in ratelimit.
Vsevolod Stakhov [Thu, 30 Oct 2014 22:29:28 +0000 (22:29 +0000)]
Fix upstreams in ratelimit.

9 years agoFuck ipv6 inventors for ipv6/v4 sockets.
Vsevolod Stakhov [Wed, 29 Oct 2014 15:40:05 +0000 (15:40 +0000)]
Fuck ipv6 inventors for ipv6/v4 sockets.

9 years agoSet length properly.
Vsevolod Stakhov [Wed, 29 Oct 2014 15:39:53 +0000 (15:39 +0000)]
Set length properly.

9 years agoFix build.
Vsevolod Stakhov [Wed, 29 Oct 2014 15:02:51 +0000 (15:02 +0000)]
Fix build.

9 years agoFix fuzzy_check.
Vsevolod Stakhov [Wed, 29 Oct 2014 14:54:28 +0000 (14:54 +0000)]
Fix fuzzy_check.

9 years agoSome more auxiliary functions.
Vsevolod Stakhov [Wed, 29 Oct 2014 14:54:18 +0000 (14:54 +0000)]
Some more auxiliary functions.

9 years agoFix surbl.
Vsevolod Stakhov [Wed, 29 Oct 2014 14:10:57 +0000 (14:10 +0000)]
Fix surbl.