Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/redis-4.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson authored Oct 25, 2023
2 parents 7484b0e + 3f3a923 commit 42f6dce
Show file tree
Hide file tree
Showing 19 changed files with 42 additions and 25 deletions.
2 changes: 2 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

### 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
4 changes: 2 additions & 2 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 @@ -109,7 +109,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
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/queue/smtp_forward.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ enable\_outbound can be set or unset on a per-domain level to enable or disable

# Split host forward routing

When an incoming email transaction has multiple recipients with different forward routes, recipients to subsequent forward routes are deferred. Example: an incoming email transaction has recipients [email protected], [email protected], and [email protected]. The first two recipients will be accepted (they share the same forward destination) and the latter will be deferred. It will arrive in a future delivery attempt by the remote.
When an incoming email transaction has multiple recipients with different forward routes, recipients to subsequent forward routes are deferred. Example: an incoming email transaction has recipients [email protected], [email protected], and [email protected]. The first two recipients will be accepted (they share the same forward destination) and the latter will be deferred. It will arrive in a future delivery attempt by the remote.
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
2 changes: 1 addition & 1 deletion 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.0",
"haraka-plugin-spf": "1.2.3",
"haraka-plugin-redis": "^2.0.5",
"haraka-results": "^2.2.3",
"haraka-tld": "^1.1.1",
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
6 changes: 3 additions & 3 deletions plugins/queue/smtp_forward.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ exports.register = function () {
if (this.cfg.main.enable_outbound) {
// deliver local message via smtp forward when relaying=true
this.register_hook('queue_outbound', 'queue_forward');

// may specify more specific routes for outbound
this.register_hook('get_mx', 'get_mx');
}

// may specify more specific [per-domain] outbound routes
this.register_hook('get_mx', 'get_mx');
}

exports.load_smtp_forward_ini = function () {
Expand Down

0 comments on commit 42f6dce

Please sign in to comment.