Haraka 3.1.1 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierignore +4 -0
- package/CONTRIBUTORS.md +5 -5
- package/Changes.md +62 -50
- package/Plugins.md +3 -1
- package/README.md +1 -1
- package/bin/haraka +475 -479
- package/config/outbound.ini +3 -0
- package/connection.js +1072 -1108
- package/docs/Connection.md +29 -30
- package/docs/CoreConfig.md +38 -39
- package/docs/CustomReturnCodes.md +0 -1
- package/docs/HAProxy.md +2 -2
- package/docs/Header.md +1 -1
- package/docs/Logging.md +29 -5
- package/docs/Outbound.md +93 -78
- package/docs/Plugins.md +103 -108
- package/docs/Transaction.md +49 -51
- package/docs/Tutorial.md +127 -143
- package/docs/deprecated/access.md +0 -1
- package/docs/deprecated/backscatterer.md +2 -3
- package/docs/deprecated/connect.rdns_access.md +18 -27
- package/docs/deprecated/data.headers.md +0 -1
- package/docs/deprecated/data.nomsgid.md +1 -2
- package/docs/deprecated/data.noreceived.md +1 -2
- package/docs/deprecated/data.rfc5322_header_checks.md +1 -2
- package/docs/deprecated/dkim_sign.md +13 -17
- package/docs/deprecated/dkim_verify.md +9 -17
- package/docs/deprecated/dnsbl.md +36 -38
- package/docs/deprecated/dnswl.md +41 -43
- package/docs/deprecated/lookup_rdns.strict.md +21 -34
- package/docs/deprecated/mail_from.access.md +17 -25
- package/docs/deprecated/mail_from.blocklist.md +9 -12
- package/docs/deprecated/mail_from.nobounces.md +1 -2
- package/docs/deprecated/rcpt_to.access.md +20 -27
- package/docs/deprecated/rcpt_to.blocklist.md +10 -13
- package/docs/deprecated/rcpt_to.routes.md +0 -1
- package/docs/deprecated/rdns.regexp.md +13 -15
- package/docs/plugins/aliases.md +89 -89
- package/docs/plugins/auth/auth_bridge.md +5 -7
- package/docs/plugins/auth/auth_ldap.md +11 -14
- package/docs/plugins/auth/auth_proxy.md +10 -12
- package/docs/plugins/auth/auth_vpopmaild.md +5 -6
- package/docs/plugins/auth/flat_file.md +4 -4
- package/docs/plugins/block_me.md +3 -3
- package/docs/plugins/data.signatures.md +1 -2
- package/docs/plugins/delay_deny.md +3 -4
- package/docs/plugins/max_unrecognized_commands.md +4 -4
- package/docs/plugins/prevent_credential_leaks.md +6 -6
- package/docs/plugins/process_title.md +18 -18
- package/docs/plugins/queue/deliver.md +2 -3
- package/docs/plugins/queue/discard.md +4 -4
- package/docs/plugins/queue/lmtp.md +1 -3
- package/docs/plugins/queue/qmail-queue.md +7 -9
- package/docs/plugins/queue/quarantine.md +16 -21
- package/docs/plugins/queue/rabbitmq.md +8 -11
- package/docs/plugins/queue/rabbitmq_amqplib.md +43 -39
- package/docs/plugins/queue/smtp_bridge.md +7 -10
- package/docs/plugins/queue/smtp_forward.md +42 -34
- package/docs/plugins/queue/smtp_proxy.md +30 -29
- package/docs/plugins/queue/test.md +1 -3
- package/docs/plugins/rcpt_to.in_host_list.md +6 -6
- package/docs/plugins/rcpt_to.max_count.md +1 -1
- package/docs/plugins/record_envelope_addresses.md +3 -3
- package/docs/plugins/reseed_rng.md +6 -6
- package/docs/plugins/status.md +9 -8
- package/docs/plugins/tarpit.md +7 -11
- package/docs/plugins/tls.md +12 -17
- package/docs/plugins/toobusy.md +4 -4
- package/docs/plugins/xclient.md +3 -3
- package/docs/tutorials/Migrating_from_v1_to_v2.md +19 -41
- package/docs/tutorials/SettingUpOutbound.md +6 -9
- package/endpoint.js +35 -38
- package/eslint.config.mjs +22 -19
- package/haraka.js +42 -47
- package/host_pool.js +75 -79
- package/http/html/404.html +45 -49
- package/http/html/index.html +39 -28
- package/http/package.json +2 -4
- package/line_socket.js +27 -28
- package/logger.js +182 -201
- package/outbound/client_pool.js +33 -33
- package/outbound/config.js +64 -59
- package/outbound/fsync_writestream.js +24 -25
- package/outbound/hmail.js +888 -835
- package/outbound/index.js +194 -187
- package/outbound/qfile.js +49 -52
- package/outbound/queue.js +197 -190
- package/outbound/timer_queue.js +41 -43
- package/outbound/tls.js +68 -61
- package/outbound/todo.js +11 -11
- package/package.json +32 -32
- package/plugins/.eslintrc.yaml +0 -1
- package/plugins/auth/auth_base.js +123 -127
- package/plugins/auth/auth_bridge.js +7 -7
- package/plugins/auth/auth_proxy.js +121 -126
- package/plugins/auth/auth_vpopmaild.js +84 -85
- package/plugins/auth/flat_file.js +18 -17
- package/plugins/block_me.js +31 -31
- package/plugins/data.signatures.js +13 -13
- package/plugins/delay_deny.js +65 -61
- package/plugins/prevent_credential_leaks.js +23 -23
- package/plugins/process_title.js +125 -128
- package/plugins/profile.js +5 -5
- package/plugins/queue/deliver.js +3 -3
- package/plugins/queue/discard.js +13 -14
- package/plugins/queue/lmtp.js +16 -17
- package/plugins/queue/qmail-queue.js +54 -55
- package/plugins/queue/quarantine.js +68 -70
- package/plugins/queue/rabbitmq.js +80 -87
- package/plugins/queue/rabbitmq_amqplib.js +75 -54
- package/plugins/queue/smtp_bridge.js +16 -16
- package/plugins/queue/smtp_forward.js +175 -179
- package/plugins/queue/smtp_proxy.js +69 -71
- package/plugins/queue/test.js +9 -9
- package/plugins/rcpt_to.host_list_base.js +30 -34
- package/plugins/rcpt_to.in_host_list.js +19 -19
- package/plugins/record_envelope_addresses.js +4 -4
- package/plugins/reseed_rng.js +4 -4
- package/plugins/status.js +90 -97
- package/plugins/tarpit.js +25 -14
- package/plugins/tls.js +68 -68
- package/plugins/toobusy.js +21 -23
- package/plugins/xclient.js +51 -53
- package/plugins.js +276 -293
- package/rfc1869.js +30 -35
- package/server.js +308 -299
- package/smtp_client.js +244 -228
- package/test/.eslintrc.yaml +0 -1
- package/test/connection.js +127 -134
- package/test/endpoint.js +53 -47
- package/test/fixtures/line_socket.js +12 -12
- package/test/fixtures/util_hmailitem.js +89 -85
- package/test/host_pool.js +90 -92
- package/test/installation/plugins/base_plugin.js +2 -2
- package/test/installation/plugins/folder_plugin/index.js +2 -3
- package/test/installation/plugins/inherits.js +3 -3
- package/test/installation/plugins/load_first.js +2 -3
- package/test/installation/plugins/plugin.js +1 -3
- package/test/installation/plugins/tls.js +2 -4
- package/test/logger.js +135 -116
- package/test/outbound/hmail.js +49 -35
- package/test/outbound/index.js +118 -101
- package/test/outbound/qfile.js +51 -53
- package/test/outbound_bounce_net_errors.js +84 -69
- package/test/outbound_bounce_rfc3464.js +235 -165
- package/test/plugins/auth/auth_base.js +420 -279
- package/test/plugins/auth/auth_vpopmaild.js +38 -39
- package/test/plugins/queue/smtp_forward.js +126 -104
- package/test/plugins/rcpt_to.host_list_base.js +85 -67
- package/test/plugins/rcpt_to.in_host_list.js +159 -112
- package/test/plugins/status.js +71 -64
- package/test/plugins/tls.js +37 -34
- package/test/plugins.js +97 -92
- package/test/rfc1869.js +19 -26
- package/test/server.js +293 -272
- package/test/smtp_client.js +180 -176
- package/test/tls_socket.js +62 -66
- package/test/transaction.js +159 -160
- package/tls_socket.js +331 -333
- package/transaction.js +129 -137
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
queue/qmail-queue
|
|
2
|
-
=================
|
|
1
|
+
# queue/qmail-queue
|
|
3
2
|
|
|
4
3
|
This plugin delivers the mail to the `qmail-queue` program, which can be used
|
|
5
4
|
for both inbound and outbound delivery.
|
|
6
5
|
|
|
7
|
-
Configuration
|
|
8
|
-
-------------
|
|
6
|
+
## Configuration
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
- qmail-queue.path
|
|
11
9
|
|
|
12
10
|
The path to the `qmail-queue` binary. Default: `/var/qmail/bin/qmail-queue`
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
- qmail-queue.ini
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
- enable_outbound=true
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
Deliver outbound email to qmail. Set to false to use Haraka's
|
|
17
|
+
separate Outbound mail routing (MX based delivery)).
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
quarantine
|
|
2
|
-
==========
|
|
1
|
+
# quarantine
|
|
3
2
|
|
|
4
3
|
This plugin will save a message (in message/rfc822 format) to a specified
|
|
5
4
|
directory, which will be created automatically if it does not already exist,
|
|
@@ -10,7 +9,7 @@ It is designed to be used by other plugins which request the message be
|
|
|
10
9
|
quarantined by setting a connection or transaction note that this plugin
|
|
11
10
|
checks.
|
|
12
11
|
|
|
13
|
-
NOTE: this plugin simply saves a copy of the message.
|
|
12
|
+
NOTE: this plugin simply saves a copy of the message. It does not reject or
|
|
14
13
|
discard the message and relies on another plugin to perform this function.
|
|
15
14
|
|
|
16
15
|
It uses the 'queue' hook, so that it runs after all the 'data_post' plugins
|
|
@@ -27,37 +26,33 @@ The temporary directory is 'quarantine_path/tmp' which defaults to:
|
|
|
27
26
|
Upon start-up, any files present in the temporary directory are deleted
|
|
28
27
|
syncronously prior to any messages being accepted.
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
Configuration
|
|
32
|
-
-------------
|
|
29
|
+
## Configuration
|
|
33
30
|
|
|
34
31
|
This plugin looks for 'quarantine.ini' in the config directory.
|
|
35
32
|
|
|
36
|
-
|
|
33
|
+
- quarantine_path (default: /var/spool/haraka/quarantine)
|
|
37
34
|
|
|
38
|
-
The default base path to save the quarantine files to.
|
|
35
|
+
The default base path to save the quarantine files to. It will be created
|
|
39
36
|
if it does not already exist.
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
Usage
|
|
43
|
-
-----
|
|
38
|
+
## Usage
|
|
44
39
|
|
|
45
40
|
If you wish to keep a copy of the message in your plugin, simply either:
|
|
46
41
|
|
|
47
42
|
```javascript
|
|
48
|
-
connection.notes.quarantine = [
|
|
43
|
+
connection.notes.quarantine = [1 | true | 'sub/directory/path']
|
|
49
44
|
```
|
|
50
45
|
|
|
51
46
|
or
|
|
52
47
|
|
|
53
48
|
```javascript
|
|
54
|
-
connection.transaction.notes.quarantine = [
|
|
49
|
+
connection.transaction.notes.quarantine = [1 | true | 'sub/directory/path']
|
|
55
50
|
```
|
|
56
51
|
|
|
57
52
|
e.g.
|
|
58
53
|
|
|
59
54
|
```javascript
|
|
60
|
-
connection.notes.quarantine = 1
|
|
55
|
+
connection.notes.quarantine = 1
|
|
61
56
|
```
|
|
62
57
|
|
|
63
58
|
would save the message to '/var/spool/quarantine/haraka/YYYYMMDD/UUID' where
|
|
@@ -66,27 +61,27 @@ YYYMMDD and UUID are expanded to current date and transaction UUID.
|
|
|
66
61
|
and
|
|
67
62
|
|
|
68
63
|
```javascript
|
|
69
|
-
connection.notes.quarantine = 'corpus'
|
|
64
|
+
connection.notes.quarantine = 'corpus'
|
|
70
65
|
```
|
|
71
66
|
|
|
72
67
|
would save the message to '/var/spool/quarantine/haraka/corpus/YYYYMMDD/UUID'.
|
|
73
68
|
|
|
74
69
|
Note: you can specify 'corpus/foo' or 'corpus/foo/bar' and the directories will
|
|
75
|
-
be automatically created.
|
|
70
|
+
be automatically created. Do not add any leading or trailing slashes.
|
|
76
71
|
|
|
77
72
|
By default - after the message is quarantined, the plugin will tell Haraka to
|
|
78
|
-
continue to the next plugin.
|
|
73
|
+
continue to the next plugin. You can specify a different action like DENY or
|
|
79
74
|
OK and supply an optional message using the following notes:
|
|
80
75
|
|
|
81
76
|
```javascript
|
|
82
|
-
connection.notes.quarantine_action = [
|
|
83
|
-
connection.transaction.notes.quarantine_action = [
|
|
77
|
+
connection.notes.quarantine_action = [OK, 'Message quarantined']
|
|
78
|
+
connection.transaction.notes.quarantine_action = [DENY, 'Message rejected']
|
|
84
79
|
```
|
|
85
80
|
|
|
86
81
|
If you don't want to supply a specific message back to the client you can
|
|
87
82
|
also just specify a return code:
|
|
88
83
|
|
|
89
84
|
```javascript
|
|
90
|
-
connection.notes.quarantine_action = OK
|
|
91
|
-
connection.transaction.notes.quarantine_action = DENY
|
|
85
|
+
connection.notes.quarantine_action = OK
|
|
86
|
+
connection.transaction.notes.quarantine_action = DENY
|
|
92
87
|
```
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
queue/rabbitmq
|
|
2
|
-
========
|
|
1
|
+
# queue/rabbitmq
|
|
3
2
|
|
|
4
3
|
This plugin delivers mails to rabbitmq queue for further processing.
|
|
5
4
|
|
|
6
|
-
Configuration
|
|
7
|
-
-------------
|
|
5
|
+
## Configuration
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
- `config/rabbitmq.ini`
|
|
8
|
+
This config file provides server address and port of rabbitmq server to deliver with other configs of queues and exchange.
|
|
9
|
+
|
|
10
|
+
Example:
|
|
13
11
|
|
|
14
|
-
|
|
15
12
|
[rabbitmq]
|
|
16
13
|
; This is name of exchange.
|
|
17
14
|
exchangeName = emailMessages
|
|
@@ -33,5 +30,5 @@ Configuration
|
|
|
33
30
|
autoDelete = false
|
|
34
31
|
; type of the exchange
|
|
35
32
|
exchangeType = direct
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
|
|
34
|
+
More information about rabbitmq can be found at https://www.rabbitmq.com/
|
|
@@ -1,47 +1,51 @@
|
|
|
1
|
-
queue/rabbitmq_amqplib
|
|
2
|
-
======================
|
|
1
|
+
# queue/rabbitmq_amqplib
|
|
3
2
|
|
|
4
3
|
This plugin delivers emails to RabbitMQ queue for further processing. Based on `queue/rabbitmq` but using `amqplib`.
|
|
5
4
|
|
|
6
|
-
Dependency
|
|
7
|
-
----------
|
|
8
|
-
* `amqplib` - https://github.com/squaremo/amqp.node
|
|
5
|
+
## Dependency
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
-------------
|
|
7
|
+
- `amqplib` - https://github.com/squaremo/amqp.node
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
## Configuration
|
|
10
|
+
|
|
11
|
+
- `config/rabbitmq.ini` - Connection, exchange and queue settings
|
|
12
|
+
|
|
13
|
+
Example:
|
|
16
14
|
|
|
17
|
-
|
|
18
15
|
[rabbitmq]
|
|
19
16
|
; Connection
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
More information about
|
|
17
|
+
; Protocol. Either "amqp" or "amqps"
|
|
18
|
+
protocol = amqp
|
|
19
|
+
host = localhost
|
|
20
|
+
port = 5672
|
|
21
|
+
;Virtual Host. Start with "/". Leave blank or not use if you don't want to use virtual hosts.
|
|
22
|
+
vhost = /haraka
|
|
23
|
+
;Credentials
|
|
24
|
+
user = guest
|
|
25
|
+
password = guest
|
|
26
|
+
; Exchange
|
|
27
|
+
exchangeName = email_messages
|
|
28
|
+
exchangeType = direct
|
|
29
|
+
; Queue
|
|
30
|
+
queueName = emails
|
|
31
|
+
confirm = true
|
|
32
|
+
durable = true
|
|
33
|
+
autoDelete = false
|
|
34
|
+
; Message
|
|
35
|
+
deliveryMode = 2
|
|
36
|
+
priority = 1
|
|
37
|
+
|
|
38
|
+
; Optional exchange arguments
|
|
39
|
+
; More information about exchange x-arguments can be found at https://www.rabbitmq.com/docs/exchanges#optional-arguments
|
|
40
|
+
[exchange_args]
|
|
41
|
+
alternate-exchange =
|
|
42
|
+
|
|
43
|
+
; Optional queue arguments
|
|
44
|
+
; More information about queue x-arguments can be found at https://www.rabbitmq.com/queues.html#optional-arguments
|
|
45
|
+
[queue_args]
|
|
46
|
+
x-dead-letter-exchange =
|
|
47
|
+
x-dead-letter-routing-key = emails_dlq
|
|
48
|
+
x-overflow = reject-publish
|
|
49
|
+
x-queue-type = quorum
|
|
50
|
+
|
|
51
|
+
More information about RabbitMQ can be found at https://www.rabbitmq.com/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
queue/
|
|
2
|
-
===============
|
|
1
|
+
# queue/smtp_bridge
|
|
3
2
|
|
|
4
3
|
This plugin delivers to another SMTP server, bridging the authentication
|
|
5
4
|
details and post data from the initial connection.
|
|
@@ -11,8 +10,7 @@ it doesn't use the AUTH details from a configuration file. This plugins
|
|
|
11
10
|
simply post the data from the original connection to the remote SMTP server
|
|
12
11
|
using the original AUTH details.
|
|
13
12
|
|
|
14
|
-
Configuration
|
|
15
|
-
-------------
|
|
13
|
+
## Configuration
|
|
16
14
|
|
|
17
15
|
Configuration is stored in `config/smtp_bridge.ini` and uses the INI
|
|
18
16
|
style formatting.
|
|
@@ -24,12 +22,11 @@ The configuration of this plugin is simple:
|
|
|
24
22
|
#auth_type=
|
|
25
23
|
#priority=10
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
for example `smtp.host.tld`. This is the only setting required.
|
|
25
|
+
- host: the host where you will be authenticating and posting,
|
|
26
|
+
for example `smtp.host.tld`. This is the only setting required.
|
|
29
27
|
|
|
30
28
|
If needed you can also set
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
- port: default to empty and Haraka will use 25.
|
|
31
|
+
- auth_type: default to empty and Haraka will try to pick an appropriate method.
|
|
32
|
+
- priority: default to 10.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
# queue/
|
|
1
|
+
# queue/smtp_forward
|
|
2
|
+
|
|
2
3
|
==================
|
|
3
4
|
|
|
4
5
|
This plugin delivers to another mail server. This is a common setup when you want to have a mail server with a solid pedigree of outbound delivery to other hosts, and inbound delivery to users.
|
|
@@ -6,66 +7,67 @@ This plugin delivers to another mail server. This is a common setup when you wan
|
|
|
6
7
|
In comparison to `queue/smtp_proxy`, this plugin waits until queue time to attempt the ongoing connection. This can be a benefit in reducing connections to your inbound mail server when you have content filtering (such as spamassassin) enabled. A possible downside is that it also delays recipient validation that the ongoing mail server may provide until queue time.
|
|
7
8
|
|
|
8
9
|
## Configuration
|
|
9
|
-
-------------
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Configuration is stored in smtp_forward.ini in the following keys:
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
- enable_outbound=[true]
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
SMTP forward outbound messages (set to false to enable Haraka's separate Outbound mail routing (MX based delivery)).
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
- host=HOST
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
The host to connect to.
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
- port=PORT
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
The port to connect to. Default: 25
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
- connect_timeout=SECONDS
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
The maximum amount of time to wait when creating a new connection to the host. Default: 30 seconds.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
- timeout=SECONDS
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
The amount of seconds to let a backend connection live idle in the connection pool. This should always be less than the global plugin timeout, which should in turn be less than the connection timeout.
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
- max_connections=NUMBER
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
Maximum number of connections at any given time. Default: 1000
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
- enable_tls=[true]
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
Enable TLS with the forward host (if supported). TLS uses options from the tls plugin. If key and cert are provided in the the outbound section of the tls plugin, that certificate will be used as a TLS Client Certificate.
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
This option controls the use of TLS via `STARTTLS`. This plugin does not work with SMTP over TLS.
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
- auth_type=[plain\|login]
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
Enable PLAIN or LOGIN SMTP AUTH. This is required to enable AUTH.
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
- auth_user=USERNAME
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
SMTP AUTH username to use.
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
- auth_pass=PASSWORD
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
SMTP AUTH password to use.
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
- queue
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
Which queue plugin to use. Default: undefined. The default bahavior is to use smtp_forward for inbound connections and outbound for relaying connections. This option is used for complex mail routes.
|
|
58
60
|
|
|
59
|
-
|
|
61
|
+
- check_sender=false
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
Requires that sender domains defined in smtp_forward.ini (see Per-Domain below) have relaying privileges. This is a form of spoof prevention and assumes that any mail clients have relaying or AUTH privileges. This is usually the case.
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
- check_recipient=false
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
By default, Haraka accepts no emails until a recipient plugin has been configured to accept mails for a domain. The simplest common case is the in_host_list plugin with a list of domains in config/host_list. An alternative is to set `check_recipient=true` and list each domain in a definition block in smtp_forward.ini (see Per-Domain Configuration). An example for two domains:
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
[example.com]
|
|
70
|
+
[example.net]
|
|
69
71
|
|
|
70
72
|
# Per-Domain Configuration
|
|
71
73
|
|
|
@@ -73,9 +75,9 @@ More specific forward routes for domains can be defined. The domain is chosen ba
|
|
|
73
75
|
|
|
74
76
|
When `domain_selector` is set to `rcpt_to` (the default), more specific routes are only honored for SMTP connections with a single recipient or SMTP connections where every recipient host is identical.
|
|
75
77
|
|
|
76
|
-
When `domain_selector` is set to `mail_from`,
|
|
78
|
+
When `domain_selector` is set to `mail_from`, it first searches for configuration using the complete email address, falls back to the domain if not found, then to main configuration.
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
enable_outbound can be set or unset on a per-domain level to enable or disable forwarding for specific domains.
|
|
79
81
|
|
|
80
82
|
# default SMTP host
|
|
81
83
|
host=1.2.3.4
|
|
@@ -89,6 +91,12 @@ enable\_outbound can be set or unset on a per-domain level to enable or disable
|
|
|
89
91
|
# auth_user=user
|
|
90
92
|
# auth_pass=pass
|
|
91
93
|
|
|
94
|
+
[email@example1.com]
|
|
95
|
+
host=1.2.3.5
|
|
96
|
+
# auth_type=plain
|
|
97
|
+
# auth_user=user
|
|
98
|
+
# auth_pass=pass
|
|
99
|
+
|
|
92
100
|
[example2.com]
|
|
93
101
|
host=1.2.3.5
|
|
94
102
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
# queue/
|
|
1
|
+
# queue/smtp_proxy
|
|
2
|
+
|
|
2
3
|
================
|
|
3
4
|
|
|
4
5
|
This plugin delivers to another mail server. This is a common setup when you want to have a mail server with a solid pedigree of outbound delivery to other hosts, and inbound delivery to users.
|
|
@@ -8,52 +9,52 @@ In comparison to `queue/smtp_forward`, this plugin makes a connection at MAIL FR
|
|
|
8
9
|
Be aware that other than connect and HELO-time filtering, you will have as many connections to your ongoing SMTP server as you have to Haraka.
|
|
9
10
|
|
|
10
11
|
## Configuration
|
|
11
|
-
-------------
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
Configuration is stored in smtp_proxy.ini in the following keys:
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
- enable_outbound=[true]
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
SMTP proxy outbound messages (set to false to enable Haraka's
|
|
20
|
+
separate Outbound mail routing (MX based delivery)).
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
The host to connect to.
|
|
22
|
+
- host=HOST
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
The host to connect to.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
- port=PORT
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
The port to connect to.
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
to the host. Default if unspecified is 30 seconds.
|
|
30
|
+
- connect_timeout=SECONDS
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
The maximum amount of time to wait when creating a new connection
|
|
33
|
+
to the host. Default if unspecified is 30 seconds.
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
proxy pool. This should always be less than the global plugin timeout,
|
|
37
|
-
which should in turn be less than the connection timeout.
|
|
35
|
+
- timeout=SECONDS
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
The amount of seconds to let a backend connection live idle in the
|
|
38
|
+
proxy pool. This should always be less than the global plugin timeout,
|
|
39
|
+
which should in turn be less than the connection timeout.
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
- max_connections=NUMBER
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Maximum number of connections to create at any given time.
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
the tls plugin.
|
|
45
|
+
- enable_tls=[true|yes|1]
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
Enable TLS with the forward host (if supported). TLS uses options from
|
|
48
|
+
the tls plugin.
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
- auth_type=[plain|login]
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Enable PLAIN or LOGIN SMTP AUTH. This is required to enable AUTH.
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
- auth_user=USERNAME
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
SMTP AUTH username to use.
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
- auth_pass=PASSWORD
|
|
59
59
|
|
|
60
|
+
SMTP AUTH password to use.
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
queue/test
|
|
2
|
-
==========
|
|
1
|
+
# queue/test
|
|
3
2
|
|
|
4
3
|
This plugin saves incoming E-Mail to your temporary directory, as `mail_{message_id}.eml`, where message_id is a UUID.
|
|
5
4
|
|
|
6
5
|
This plugin can be useful to quickly test if you're able to receive incoming E-Mail and just dump them to disk.
|
|
7
6
|
|
|
8
7
|
The temporary directory is determined using Node's [`os.tmpdir()`](https://nodejs.org/api/os.html#ostmpdir), which respects standard platform configurations.
|
|
9
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# rcpt_to.in_host_list
|
|
2
2
|
|
|
3
3
|
This plugin is the mainstay of an inbound Haraka server. It should list the
|
|
4
4
|
domains that are local to the host. Mails that have RCPT TO not matching
|
|
@@ -7,20 +7,20 @@ hook accepts the connection, it will be rejected.
|
|
|
7
7
|
|
|
8
8
|
## Configuration
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
- host_list
|
|
11
11
|
|
|
12
12
|
Specifies the list of hosts that are local to this server.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- host_list_regex
|
|
15
15
|
|
|
16
|
-
Specifies the list of regexes that are local to this server.
|
|
16
|
+
Specifies the list of regexes that are local to this server. Note
|
|
17
17
|
all these regexes are anchored with ^regex$. One can choose not to
|
|
18
18
|
anchor with .\*. There is the potential for bad regexes to be
|
|
19
19
|
too permissive if we don't anchor.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
- host_list.anti_spoof
|
|
22
22
|
|
|
23
|
-
When enabled, this will cause Haraka to reject any MAIL FROM where
|
|
23
|
+
When enabled, this will cause Haraka to reject any MAIL FROM where
|
|
24
24
|
the host appears within the host list but the connected host is not
|
|
25
25
|
a relay, e.g. connection.relaying is not set either by SMTP AUTH or
|
|
26
26
|
another plugin like 'relay'.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# record_envelope_addresses
|
|
2
2
|
|
|
3
3
|
This plugin adds two new header lines.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
- X-Envelope-To: the envelope RCPT TO address
|
|
6
|
+
- X-Envelope-From: the envelope MAIL FROM address
|
|
7
7
|
|
|
8
8
|
It is useful if you need to know the exact addresses used to send an email, e.g. when
|
|
9
9
|
the email was sent to you as BCC or if it is a newsletter. In both cases the recipient
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# reseed_rng
|
|
2
2
|
|
|
3
3
|
The V8 that ships with node 0.4.x uses an unsophisticated method of
|
|
4
4
|
seeding its random number generator- it simply uses the current time
|
|
5
|
-
in ms.
|
|
5
|
+
in ms. Worse, that version of V8 (at least) doesn't provide a way
|
|
6
6
|
to explicitly reseed the RNG.
|
|
7
7
|
|
|
8
8
|
In situations where multiple processes can spawn in the same
|
|
9
|
-
ms, processes can be seeded with the same value, leading to bad
|
|
9
|
+
ms, processes can be seeded with the same value, leading to bad
|
|
10
10
|
problems like UUID collisions. When using the 'cluster' module, it's
|
|
11
|
-
quite easy to observe this behavior.
|
|
11
|
+
quite easy to observe this behavior.
|
|
12
12
|
|
|
13
13
|
This plugin uses David Bao's reseed.js (see http://davidbau.com/archives/2010/01/30/random_seeds_coded_hints_and_quintillions.html)
|
|
14
|
-
to provide a reseedable Math.random(), and hooks the
|
|
14
|
+
to provide a reseedable Math.random(), and hooks the init_child event
|
|
15
15
|
to reseed the RNG with a sligtly better seed at spawned-process startup
|
|
16
|
-
time.
|
|
16
|
+
time.
|
|
17
17
|
|
|
18
18
|
All users of the 'cluster' module should consider using this plugin.
|
package/docs/plugins/status.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# Status
|
|
2
2
|
|
|
3
|
-
This plugin allows to get internal status of queues and pools with SMTP commands sent from localhost.
|
|
3
|
+
This plugin allows to get internal status of queues and pools with SMTP commands sent from localhost.
|
|
4
4
|
|
|
5
5
|
## Communication
|
|
6
6
|
|
|
7
7
|
- **Request** → `STATUS <CMD> [param1] [param2]....`
|
|
8
|
-
- **Response** ←
|
|
8
|
+
- **Response** ← _<SMTP code 211 or 500><space><json encoded response>\r\n_
|
|
9
9
|
|
|
10
10
|
### Example
|
|
11
|
+
|
|
11
12
|
```
|
|
12
13
|
< 220 example.com ESMTP Haraka ready
|
|
13
14
|
> STATUS QUEUE LIST
|
|
@@ -16,9 +17,9 @@ This plugin allows to get internal status of queues and pools with SMTP commands
|
|
|
16
17
|
|
|
17
18
|
## Available commands list
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
- `STATUS POOL LIST` - list of active pools
|
|
21
|
+
- `STATUS QUEUE STATS` - queue statistics in format "<in_progress>/<delivery_queue length>/<temp_fail_queue length>"
|
|
22
|
+
- `STATUS QUEUE LIST` - list of parsed queue files with _uuid, domain, mail_from, rcpt_to_ attributes
|
|
23
|
+
- `STATUS QUEUE INSPECT` - returns content of _outbound.delivery_queue_ and _outbound.temp_fail_queue_
|
|
24
|
+
- `STATUS QUEUE DISCARD file` - stop delivering email file
|
|
25
|
+
- `STATUS QUEUE PUSH file` - try to re-deliver email immediately
|