Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/haraka-plugin-elas…
Browse files Browse the repository at this point in the history
…ticsearch-8.0.0
  • Loading branch information
msimerson authored Dec 3, 2023
2 parents 9da84cc + 1f5dd23 commit 2730637
Show file tree
Hide file tree
Showing 18 changed files with 41 additions and 24 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
### Unreleased

- dep(plugin-spf): bump version to 1.2.1
- feat(rabbitmq_amqplib): configurable optional queue arguments

### [3.0.2] - 2023-06-12

Expand Down
7 changes: 4 additions & 3 deletions Plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
To create your own plugin, see:
- the [plugin template][template] that includes all the boilerplate
- the [Write a Plugin][write-plugin] tutorial
- the [Plugins](plugins-doc) section of [the manual](https://haraka.github.io)
- the [Plugins][plugins-doc] section of [the manual](https://haraka.github.io)

## Installing NPM packaged plugins

Expand Down Expand Up @@ -82,6 +82,7 @@ Create a PR adding yours to this list.
| queue/[smtp_bridge][url-qbridge] | Bridge SMTP sessions to another MTA |
| queue/[smtp_forward][url-qforward] | Forward emails to another MTA |
| queue/[smtp_proxy][url-qproxy] | Proxy SMTP connections to another MTA |
| [queue-kafka][url-kafka] | Queue inbound mail to a Kafka topic |
| [recipient-routes][url-rroutes] | Route emails based on their recipient(s) |
| [redis][url-redis] | multi-purpose Redis db connection(s) |
| [rcpt_to.in_host_list][url-rhost] | Define local email domains in a file |
Expand Down Expand Up @@ -109,7 +110,7 @@ Create a PR adding yours to this list.

[template]: https://github.com/haraka/haraka-plugin-template
[write-plugin]: https://github.com/haraka/Haraka/wiki/Write-a-Plugin
[plugins-doc]: https://haraka.github.io/manual/Plugins.html
[plugins-doc]: https://haraka.github.io/core/Plugins
[url-access]: https://github.com/haraka/haraka-plugin-access
[url-acc-files]: https://github.com/acharkizakaria/haraka-plugin-accounting-files/blob/master/README.md
[url-action-mailbox]: https://guides.rubyonrails.org/action_mailbox_basics.html
Expand Down Expand Up @@ -192,4 +193,4 @@ Create a PR adding yours to this list.
[url-xclient]: https://github.com/haraka/Haraka/blob/master/docs/plugins/xclient.md
[mongo-url]: https://github.com/Helpmonks/haraka-plugin-mongodb
[url-outbound-logger]: https://github.com/mr-karan/haraka-plugin-outbound-logger

[url-kafka]: https://github.com/benjamonnguyen/haraka-plugin-queue-kafka
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ SpamAssassin and a hacker on [Qpsmtpd][13].
[6]: https://github.com/haraka/Haraka/blob/master/docs/plugins/dkim_sign.md
[7]: https://en.wikipedia.org/wiki/Mail_delivery_agent
[8]: mailto:[email protected]
[9]: https://haraka.github.io/manual/plugins/spamassassin.html
[10]: https://haraka.github.io/manual/plugins/helo.checks.html
[11]: https://haraka.github.io/manual/plugins/dnsbl.html
[12]: https://github.com/haraka/Haraka/tree/master/plugins
[9]: https://haraka.github.io/plugins/spamassassin
[10]: https://haraka.github.io/plugins/helo.checks
[11]: https://haraka.github.io/plugins/dnsbl
[12]: https://github.com/haraka/Haraka/blob/master/Plugins.md
[13]: https://github.com/smtpd/qpsmtpd/
[15]: https://github.com/haraka/Haraka/issues
[16]: https://github.com/haraka/Haraka/blob/master/LICENSE
Expand Down
2 changes: 1 addition & 1 deletion config/access.domains
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# aol.com
# [email protected]
#
# See full docs for details: http://haraka.github.io/manual/plugins/access.html
# See full docs for details: http://haraka.github.io/plugins/access
9 changes: 8 additions & 1 deletion config/rabbitmq_amqplib.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ queueName = emails
deliveryMode = 2
confirm = true
durable = true
autoDelete = false
autoDelete = false

; Optional queue arguments
; [queue_args]
; x-dead-letter-exchange =
; x-dead-letter-routing-key = emails_dlq
; x-overflow = reject-publish
; x-queue-type = quorum
2 changes: 1 addition & 1 deletion docs/Connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ For low level use. This value is set when the remote host drops the connection.

* connection.results

Store results of processing in a structured format. See [docs/Results](http://haraka.github.io/manual/Results.html)
Store results of processing in a structured format. See [haraka-results](https://github.com/haraka/haraka-results)

6 changes: 3 additions & 3 deletions docs/Outbound.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ of CPUs that you have.

Default: true. Switch to false to disable TLS for outbound mail.

This uses the same `tls_key.pem` and `tls_cert.pem` files that the `tls`
plugin uses, along with other values in `tls.ini`. See the [tls plugin
docs](http://haraka.github.io/manual/plugins/tls.html) for information on generating those files.
This uses the same `tls_key.pem` and `tls_cert.pem` files that the `TLS`
plugin uses, along with other values in `tls.ini`. See the [TLS plugin
docs](http://haraka.github.io/plugins/tls) for information on generating those files.

Within `tls.ini` you can specify global options for the values `ciphers`, `minVersion`, `requestCert` and `rejectUnauthorized`, alternatively you can provide separate values by putting them under a key: `[outbound]`, such as:

Expand Down
2 changes: 1 addition & 1 deletion docs/Transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,6 @@ body in the same encoding.

* transaction.results

Store results of processing in a structured format. See [docs/Results](http://haraka.github.io/manual/Results.html)
Store results of processing in a structured format. See [haraka-results](https://github.com/haraka/haraka-results)

[1]: `Address` objects are address-rfc2821 objects. See https://github.com/haraka/node-address-rfc2821
2 changes: 1 addition & 1 deletion docs/plugins/connect.rdns_access.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## DEPRECATION NOTICE

See the [access](http://haraka.github.io/manual/plugins/access.html) plugin
See [haraka-plugin-access](https://github.com/haraka/haraka-plugin-access)
for upgrade instructions.


Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/mail_from.access.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## DEPRECATION NOTICE

See the [access](http://haraka.github.io/manual/plugins/access.html) plugin
See [haraka-plugin-access](https://github.com/haraka/haraka-plugin-access)
for upgrade instructions.


Expand Down
7 changes: 7 additions & 0 deletions docs/plugins/queue/rabbitmq_amqplib.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,12 @@ Configuration
durable = true
autoDelete = false

; Optional queue arguments
; More information about x-arguments can be found at https://www.rabbitmq.com/queues.html#optional-arguments
[queue_args]
x-dead-letter-exchange =
x-dead-letter-routing-key = emails_dlq
x-overflow = reject-publish
x-queue-type = quorum

More information about RabbitMQ can be found at https://www.rabbitmq.com/
2 changes: 1 addition & 1 deletion docs/plugins/rcpt_to.access.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## DEPRECATION NOTICE

See the [access](http://haraka.github.io/manual/plugins/access.html) plugin
See [haraka-plugin-access](https://github.com/haraka/haraka-plugin-access)
for upgrade instructions.


Expand Down
4 changes: 2 additions & 2 deletions docs/plugins/relay.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This **relay** plugin provides Haraka with options for managing relay permission

## Authentication

One way to enable relaying is [authentication](http://haraka.github.io/manual.html) via the auth plugins. Successful authentication enables relaying during _that_ SMTP connection. To securely offer SMTP AUTH, the [tls](http://haraka.github.io/manual/plugins/tls.html) plugin and at least one auth plugin must be enabled and properly configured. When that requirement is met, the AUTH SMTP extension will be advertised to SMTP clients.
One way to enable relaying is authentication via the [auth plugins](http://haraka.github.io/plugins). Successful authentication enables relaying during _that_ SMTP connection. To securely offer SMTP AUTH, the [tls](http://haraka.github.io/plugins/tls) plugin and at least one auth plugin must be enabled and properly configured. When that requirement is met, the AUTH SMTP extension will be advertised to SMTP clients.

% nc mail.example.com 587
220 mail.example.com ESMTP Haraka 2.4.0 ready
Expand Down Expand Up @@ -118,7 +118,7 @@ Example:
[domains]
test.com = { "action": "accept" }

I think of *accept* as the equivalent of qmail's *rcpthosts*, or a misplaced Haraka `rcpt_to.*` plugin. The *accept* mechanism is another way to tell Haraka that a particular domain is one we accept mail for. The difference between this and the [rcpt_to.in_host_list](http://haraka.github.io/manual/plugins/rcpt_to.in_host_list.html) plugin is that this one also enables relaying.
Think of *accept* as the equivalent of qmail's *rcpthosts*, or a misplaced Haraka `rcpt_to.*` plugin. The *accept* mechanism is another way to tell Haraka that a particular domain is one we accept mail for. The difference between this and the [rcpt_to.in_host_list](http://haraka.github.io/plugins/rcpt_to.in_host_list) plugin is that this one also enables relaying.

* continue (mails are subject to further checks)

Expand Down
2 changes: 1 addition & 1 deletion outbound/hmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ class HMailItem extends events.EventEmitter {
"\r": '#10',
"\n": '#13'
};
const escape_pattern = new RegExp(`[${Object.keys(escaped_chars).join()}]`, 'g');
const escape_pattern = new RegExp(`[${Object.keys(escaped_chars).join('')}]`, 'g');

bounce_msg_html_.forEach(line => {
line = line.replace(/\{(\w+)\}/g, (i, word) => {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"haraka-net-utils": "^1.5.0",
"haraka-notes": "^1.0.6",
"haraka-plugin-attachment": "^1.0.7",
"haraka-plugin-spf": "1.2.1",
"haraka-plugin-spf": "1.2.3",
"haraka-plugin-redis": "^2.0.5",
"haraka-results": "^2.2.3",
"haraka-tld": "^1.1.1",
Expand Down Expand Up @@ -69,7 +69,7 @@
"haraka-plugin-uribl": "^1.0.6",
"haraka-plugin-watch": "^2.0.2",
"ocsp": "~1.2.0",
"redis": "^4.5.1",
"redis": "~4.6.7",
"tmp": "~0.2.1"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions plugins/clamd.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ exports.hook_data_post = function (next, connection) {
if (virus && plugin.rejectRE && // enabled
plugin.allRE.test(virus) && // has a reject option
!plugin.rejectRE.test(virus)) { // reject=false set
txn.add_header('X-Haraka-Virus', virus);
return next();
}
if (!plugin.cfg.reject.virus) { return next(); }
Expand Down
2 changes: 1 addition & 1 deletion plugins/queue/rabbitmq_amqplib.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ exports.init_amqp_connection = function () {
return conn.close();
}
ch.assertQueue(queueName,
{durable, autoDelete},
{durable, autoDelete, arguments: this.config.get("rabbitmq.ini").queue_args},
(err4, ok2) => {
if (err4) {
this.logerror(`Error asserting rabbitmq queue: ${err4}`);
Expand Down
2 changes: 1 addition & 1 deletion transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class Transaction {
this.header_lines.push(line.toString(this.encoding).replace(/\r\n$/, '\n'));
}
}
else if (this.header_pos && this.parse_body) {
else if (this.parse_body) {
let new_line = line;
if (new_line[0] === 0x2E) new_line = new_line.slice(1); // Strip leading "."

Expand Down

0 comments on commit 2730637

Please sign in to comment.