Skip to content

Commit

Permalink
update Changes, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Feb 23, 2023
1 parent 2c91637 commit ff6a789
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
### Unreleased


### [1.3.0] - 2023-02-23

- add defer options, similar to spamassassin.js #32


### [1.2.0] - 2022-10-14

- Make milter header handling compatible with rspamd 3.3 (#30)
Expand Down Expand Up @@ -65,3 +70,4 @@

[1.1.8]: https://github.com/haraka/haraka-plugin-rspamd/releases/tag/1.1.8
[1.1.9]: https://github.com/haraka/haraka-plugin-rspamd/releases/tag/1.1.9
[1.3.0]: https://github.com/haraka/haraka-plugin-rspamd/releases/tag/1.3.0
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ exports.get_options = function (connection) {
const rcpts = connection.transaction.rcpt_to;
if (rcpts) {
options.headers.Rcpt = [];
for (let i=0; i < rcpts.length; i++) {
options.headers.Rcpt.push(rcpts[i].address());
for (const rcpt of rcpts) {
options.headers.Rcpt.push(rcpt.address());
}

// for per-user options
Expand Down Expand Up @@ -226,12 +226,12 @@ exports.hook_data_post = function (next, connection) {
clearTimeout(timer);
if (calledNext) return;
calledNext=true;
if (!connection?.transaction) return;
next(code, msg);
}

timer = setTimeout(() => {
if (!connection) return;
if (!connection.transaction) return;
if (!connection?.transaction) return;
connection.transaction.results.add(plugin, {err: 'timeout'});
if (plugin.cfg.defer.timeout) return nextOnce(DENYSOFT, 'Rspamd scan timeout');
nextOnce();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haraka-plugin-rspamd",
"version": "1.2.0",
"version": "1.3.0",
"description": "Haraka plugin for rspamd",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit ff6a789

Please sign in to comment.