haraka-plugin-limit
Advanced tools
Comparing version 1.0.7 to 1.1.0
### Unreleased | ||
### [1.1.0] - 2022-08-18 | ||
- initialize redis when only concurrency is enabled (#42) | ||
### [1.0.7] - 2022-06-03 | ||
@@ -52,1 +58,2 @@ | ||
[1.0.7]: https://github.com/haraka/haraka-plugin-limit/releases/tag/1.0.7 | ||
[1.1.0]: https://github.com/haraka/haraka-plugin-limit/releases/tag/1.1.0 |
11
index.js
@@ -13,2 +13,3 @@ 'use strict'; | ||
if (this.cfg.concurrency.enabled) { | ||
needs_redis++; | ||
this.register_hook('connect_init', 'conn_concur_incr'); | ||
@@ -34,3 +35,3 @@ this.register_hook('connect', 'check_concurrency'); | ||
if (this.cfg.rate_conn.enabled) { | ||
needs_redis++ | ||
needs_redis++; | ||
this.register_hook('connect_init', 'rate_conn_incr'); | ||
@@ -40,3 +41,3 @@ this.register_hook('connect', 'rate_conn_enforce'); | ||
if (this.cfg.rate_rcpt_host.enabled) { | ||
needs_redis++ | ||
needs_redis++; | ||
this.register_hook('connect', 'rate_rcpt_host_enforce'); | ||
@@ -46,11 +47,11 @@ this.register_hook('rcpt', 'rate_rcpt_host_incr'); | ||
if (this.cfg.rate_rcpt_sender.enabled) { | ||
needs_redis++ | ||
needs_redis++; | ||
this.register_hook('rcpt', 'rate_rcpt_sender'); | ||
} | ||
if (this.cfg.rate_rcpt_null.enabled) { | ||
needs_redis++ | ||
needs_redis++; | ||
this.register_hook('rcpt', 'rate_rcpt_null'); | ||
} | ||
if (this.cfg.rate_rcpt.enabled) { | ||
needs_redis++ | ||
needs_redis++; | ||
this.register_hook('rcpt', 'rate_rcpt'); | ||
@@ -57,0 +58,0 @@ } |
{ | ||
"name": "haraka-plugin-limit", | ||
"version": "1.0.7", | ||
"version": "1.1.0", | ||
"description": "enforce various types of limits on remote MTAs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
863
47476
13