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.
Files changed (160) hide show
  1. package/.prettierignore +4 -0
  2. package/CONTRIBUTORS.md +5 -5
  3. package/Changes.md +62 -50
  4. package/Plugins.md +3 -1
  5. package/README.md +1 -1
  6. package/bin/haraka +475 -479
  7. package/config/outbound.ini +3 -0
  8. package/connection.js +1072 -1108
  9. package/docs/Connection.md +29 -30
  10. package/docs/CoreConfig.md +38 -39
  11. package/docs/CustomReturnCodes.md +0 -1
  12. package/docs/HAProxy.md +2 -2
  13. package/docs/Header.md +1 -1
  14. package/docs/Logging.md +29 -5
  15. package/docs/Outbound.md +93 -78
  16. package/docs/Plugins.md +103 -108
  17. package/docs/Transaction.md +49 -51
  18. package/docs/Tutorial.md +127 -143
  19. package/docs/deprecated/access.md +0 -1
  20. package/docs/deprecated/backscatterer.md +2 -3
  21. package/docs/deprecated/connect.rdns_access.md +18 -27
  22. package/docs/deprecated/data.headers.md +0 -1
  23. package/docs/deprecated/data.nomsgid.md +1 -2
  24. package/docs/deprecated/data.noreceived.md +1 -2
  25. package/docs/deprecated/data.rfc5322_header_checks.md +1 -2
  26. package/docs/deprecated/dkim_sign.md +13 -17
  27. package/docs/deprecated/dkim_verify.md +9 -17
  28. package/docs/deprecated/dnsbl.md +36 -38
  29. package/docs/deprecated/dnswl.md +41 -43
  30. package/docs/deprecated/lookup_rdns.strict.md +21 -34
  31. package/docs/deprecated/mail_from.access.md +17 -25
  32. package/docs/deprecated/mail_from.blocklist.md +9 -12
  33. package/docs/deprecated/mail_from.nobounces.md +1 -2
  34. package/docs/deprecated/rcpt_to.access.md +20 -27
  35. package/docs/deprecated/rcpt_to.blocklist.md +10 -13
  36. package/docs/deprecated/rcpt_to.routes.md +0 -1
  37. package/docs/deprecated/rdns.regexp.md +13 -15
  38. package/docs/plugins/aliases.md +89 -89
  39. package/docs/plugins/auth/auth_bridge.md +5 -7
  40. package/docs/plugins/auth/auth_ldap.md +11 -14
  41. package/docs/plugins/auth/auth_proxy.md +10 -12
  42. package/docs/plugins/auth/auth_vpopmaild.md +5 -6
  43. package/docs/plugins/auth/flat_file.md +4 -4
  44. package/docs/plugins/block_me.md +3 -3
  45. package/docs/plugins/data.signatures.md +1 -2
  46. package/docs/plugins/delay_deny.md +3 -4
  47. package/docs/plugins/max_unrecognized_commands.md +4 -4
  48. package/docs/plugins/prevent_credential_leaks.md +6 -6
  49. package/docs/plugins/process_title.md +18 -18
  50. package/docs/plugins/queue/deliver.md +2 -3
  51. package/docs/plugins/queue/discard.md +4 -4
  52. package/docs/plugins/queue/lmtp.md +1 -3
  53. package/docs/plugins/queue/qmail-queue.md +7 -9
  54. package/docs/plugins/queue/quarantine.md +16 -21
  55. package/docs/plugins/queue/rabbitmq.md +8 -11
  56. package/docs/plugins/queue/rabbitmq_amqplib.md +43 -39
  57. package/docs/plugins/queue/smtp_bridge.md +7 -10
  58. package/docs/plugins/queue/smtp_forward.md +42 -34
  59. package/docs/plugins/queue/smtp_proxy.md +30 -29
  60. package/docs/plugins/queue/test.md +1 -3
  61. package/docs/plugins/rcpt_to.in_host_list.md +6 -6
  62. package/docs/plugins/rcpt_to.max_count.md +1 -1
  63. package/docs/plugins/record_envelope_addresses.md +3 -3
  64. package/docs/plugins/reseed_rng.md +6 -6
  65. package/docs/plugins/status.md +9 -8
  66. package/docs/plugins/tarpit.md +7 -11
  67. package/docs/plugins/tls.md +12 -17
  68. package/docs/plugins/toobusy.md +4 -4
  69. package/docs/plugins/xclient.md +3 -3
  70. package/docs/tutorials/Migrating_from_v1_to_v2.md +19 -41
  71. package/docs/tutorials/SettingUpOutbound.md +6 -9
  72. package/endpoint.js +35 -38
  73. package/eslint.config.mjs +22 -19
  74. package/haraka.js +42 -47
  75. package/host_pool.js +75 -79
  76. package/http/html/404.html +45 -49
  77. package/http/html/index.html +39 -28
  78. package/http/package.json +2 -4
  79. package/line_socket.js +27 -28
  80. package/logger.js +182 -201
  81. package/outbound/client_pool.js +33 -33
  82. package/outbound/config.js +64 -59
  83. package/outbound/fsync_writestream.js +24 -25
  84. package/outbound/hmail.js +888 -835
  85. package/outbound/index.js +194 -187
  86. package/outbound/qfile.js +49 -52
  87. package/outbound/queue.js +197 -190
  88. package/outbound/timer_queue.js +41 -43
  89. package/outbound/tls.js +68 -61
  90. package/outbound/todo.js +11 -11
  91. package/package.json +32 -32
  92. package/plugins/.eslintrc.yaml +0 -1
  93. package/plugins/auth/auth_base.js +123 -127
  94. package/plugins/auth/auth_bridge.js +7 -7
  95. package/plugins/auth/auth_proxy.js +121 -126
  96. package/plugins/auth/auth_vpopmaild.js +84 -85
  97. package/plugins/auth/flat_file.js +18 -17
  98. package/plugins/block_me.js +31 -31
  99. package/plugins/data.signatures.js +13 -13
  100. package/plugins/delay_deny.js +65 -61
  101. package/plugins/prevent_credential_leaks.js +23 -23
  102. package/plugins/process_title.js +125 -128
  103. package/plugins/profile.js +5 -5
  104. package/plugins/queue/deliver.js +3 -3
  105. package/plugins/queue/discard.js +13 -14
  106. package/plugins/queue/lmtp.js +16 -17
  107. package/plugins/queue/qmail-queue.js +54 -55
  108. package/plugins/queue/quarantine.js +68 -70
  109. package/plugins/queue/rabbitmq.js +80 -87
  110. package/plugins/queue/rabbitmq_amqplib.js +75 -54
  111. package/plugins/queue/smtp_bridge.js +16 -16
  112. package/plugins/queue/smtp_forward.js +175 -179
  113. package/plugins/queue/smtp_proxy.js +69 -71
  114. package/plugins/queue/test.js +9 -9
  115. package/plugins/rcpt_to.host_list_base.js +30 -34
  116. package/plugins/rcpt_to.in_host_list.js +19 -19
  117. package/plugins/record_envelope_addresses.js +4 -4
  118. package/plugins/reseed_rng.js +4 -4
  119. package/plugins/status.js +90 -97
  120. package/plugins/tarpit.js +25 -14
  121. package/plugins/tls.js +68 -68
  122. package/plugins/toobusy.js +21 -23
  123. package/plugins/xclient.js +51 -53
  124. package/plugins.js +276 -293
  125. package/rfc1869.js +30 -35
  126. package/server.js +308 -299
  127. package/smtp_client.js +244 -228
  128. package/test/.eslintrc.yaml +0 -1
  129. package/test/connection.js +127 -134
  130. package/test/endpoint.js +53 -47
  131. package/test/fixtures/line_socket.js +12 -12
  132. package/test/fixtures/util_hmailitem.js +89 -85
  133. package/test/host_pool.js +90 -92
  134. package/test/installation/plugins/base_plugin.js +2 -2
  135. package/test/installation/plugins/folder_plugin/index.js +2 -3
  136. package/test/installation/plugins/inherits.js +3 -3
  137. package/test/installation/plugins/load_first.js +2 -3
  138. package/test/installation/plugins/plugin.js +1 -3
  139. package/test/installation/plugins/tls.js +2 -4
  140. package/test/logger.js +135 -116
  141. package/test/outbound/hmail.js +49 -35
  142. package/test/outbound/index.js +118 -101
  143. package/test/outbound/qfile.js +51 -53
  144. package/test/outbound_bounce_net_errors.js +84 -69
  145. package/test/outbound_bounce_rfc3464.js +235 -165
  146. package/test/plugins/auth/auth_base.js +420 -279
  147. package/test/plugins/auth/auth_vpopmaild.js +38 -39
  148. package/test/plugins/queue/smtp_forward.js +126 -104
  149. package/test/plugins/rcpt_to.host_list_base.js +85 -67
  150. package/test/plugins/rcpt_to.in_host_list.js +159 -112
  151. package/test/plugins/status.js +71 -64
  152. package/test/plugins/tls.js +37 -34
  153. package/test/plugins.js +97 -92
  154. package/test/rfc1869.js +19 -26
  155. package/test/server.js +293 -272
  156. package/test/smtp_client.js +180 -176
  157. package/test/tls_socket.js +62 -66
  158. package/test/transaction.js +159 -160
  159. package/tls_socket.js +331 -333
  160. 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
- * qmail-queue.path
8
+ - qmail-queue.path
11
9
 
12
10
  The path to the `qmail-queue` binary. Default: `/var/qmail/bin/qmail-queue`
13
11
 
14
- * qmail-queue.ini
12
+ - qmail-queue.ini
15
13
 
16
- * enable_outbound=true
14
+ - enable_outbound=true
17
15
 
18
- Deliver outbound email to qmail. Set to false to use Haraka's
19
- separate Outbound mail routing (MX based delivery)).
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. It does not reject or
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
- * quarantine\_path (default: /var/spool/haraka/quarantine)
33
+ - quarantine_path (default: /var/spool/haraka/quarantine)
37
34
 
38
- The default base path to save the quarantine files to. It will be created
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 = [ 1 | true | 'sub/directory/path' ];
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 = [ 1 | true | 'sub/directory/path' ];
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. Do not add any leading or trailing slashes.
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. You can specify a different action like DENY or
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 = [ OK, 'Message quarantined' ];
83
- connection.transaction.notes.quarantine_action = [ DENY, 'Message rejected' ];
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
- * `config/rabbitmq.ini`
10
- This config file provides server address and port of rabbitmq server to deliver with other configs of queues and exchange.
11
-
12
- Example:
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
- More information about rabbitmq can be found at https://www.rabbitmq.com/
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
- Configuration
11
- -------------
7
+ - `amqplib` - https://github.com/squaremo/amqp.node
12
8
 
13
- * `config/rabbitmq.ini` - Connection, exchange and queue settings
14
-
15
- Example:
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
- ; Protocol. Either "amqp" or "amqps"
21
- protocol = amqp
22
- host = localhost
23
- port = 5672
24
- ;Virtual Host. Start with "/". Leave blank or not use if you don't want to use virtual hosts.
25
- vhost = /haraka
26
- ;Credentials
27
- user = guest
28
- password = guest
29
- ; Exchange
30
- exchangeName = email_messages
31
- exchangeType = direct
32
- ; Queue
33
- queueName = emails
34
- deliveryMode = 2
35
- confirm = true
36
- durable = true
37
- autoDelete = false
38
-
39
- ; Optional queue arguments
40
- ; More information about x-arguments can be found at https://www.rabbitmq.com/queues.html#optional-arguments
41
- [queue_args]
42
- x-dead-letter-exchange =
43
- x-dead-letter-routing-key = emails_dlq
44
- x-overflow = reject-publish
45
- x-queue-type = quorum
46
-
47
- More information about RabbitMQ can be found at https://www.rabbitmq.com/
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/smtp\_bridge
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
- * host: the host where you will be authenticating and posting,
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
- * port: default to empty and Haraka will use 25.
33
- * auth_type: default to empty and Haraka will try to pick an appropriate method.
34
- * priority: default to 10.
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/smtp\_forward
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
- Configuration is stored in smtp\_forward.ini in the following keys:
11
+ ---
12
+
13
+ Configuration is stored in smtp_forward.ini in the following keys:
12
14
 
13
- * enable\_outbound=[true]
15
+ - enable_outbound=[true]
14
16
 
15
- SMTP forward outbound messages (set to false to enable Haraka's separate Outbound mail routing (MX based delivery)).
17
+ SMTP forward outbound messages (set to false to enable Haraka's separate Outbound mail routing (MX based delivery)).
16
18
 
17
- * host=HOST
19
+ - host=HOST
18
20
 
19
- The host to connect to.
21
+ The host to connect to.
20
22
 
21
- * port=PORT
23
+ - port=PORT
22
24
 
23
- The port to connect to. Default: 25
25
+ The port to connect to. Default: 25
24
26
 
25
- * connect\_timeout=SECONDS
27
+ - connect_timeout=SECONDS
26
28
 
27
- The maximum amount of time to wait when creating a new connection to the host. Default: 30 seconds.
29
+ The maximum amount of time to wait when creating a new connection to the host. Default: 30 seconds.
28
30
 
29
- * timeout=SECONDS
31
+ - timeout=SECONDS
30
32
 
31
- 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.
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
- * max\_connections=NUMBER
35
+ - max_connections=NUMBER
34
36
 
35
- Maximum number of connections at any given time. Default: 1000
37
+ Maximum number of connections at any given time. Default: 1000
36
38
 
37
- * enable\_tls=[true]
39
+ - enable_tls=[true]
38
40
 
39
- 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.
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
- This option controls the use of TLS via `STARTTLS`. This plugin does not work with SMTP over TLS.
43
+ This option controls the use of TLS via `STARTTLS`. This plugin does not work with SMTP over TLS.
42
44
 
43
- * auth\_type=[plain\|login]
45
+ - auth_type=[plain\|login]
44
46
 
45
- Enable PLAIN or LOGIN SMTP AUTH. This is required to enable AUTH.
47
+ Enable PLAIN or LOGIN SMTP AUTH. This is required to enable AUTH.
46
48
 
47
- * auth\_user=USERNAME
49
+ - auth_user=USERNAME
48
50
 
49
- SMTP AUTH username to use.
51
+ SMTP AUTH username to use.
50
52
 
51
- * auth\_pass=PASSWORD
53
+ - auth_pass=PASSWORD
52
54
 
53
- SMTP AUTH password to use.
55
+ SMTP AUTH password to use.
54
56
 
55
- * queue
57
+ - queue
56
58
 
57
- 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.
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
- * check_sender=false
61
+ - check_sender=false
60
62
 
61
- 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.
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
- * check_recipient=false
65
+ - check_recipient=false
64
66
 
65
- 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:
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
- [example.com]
68
- [example.net]
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`, the domain of the MAIL FROM address is used.
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
- enable\_outbound can be set or unset on a per-domain level to enable or disable forwarding for specific domains.
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/smtp\_proxy
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
- Configuration is stored in smtp\_proxy.ini in the following keys:
13
+ ---
14
+
15
+ Configuration is stored in smtp_proxy.ini in the following keys:
14
16
 
15
- * enable\_outbound=[true]
17
+ - enable_outbound=[true]
16
18
 
17
- SMTP proxy outbound messages (set to false to enable Haraka's
18
- separate Outbound mail routing (MX based delivery)).
19
+ SMTP proxy outbound messages (set to false to enable Haraka's
20
+ separate Outbound mail routing (MX based delivery)).
19
21
 
20
- * host=HOST
21
-
22
- The host to connect to.
22
+ - host=HOST
23
23
 
24
- * port=PORT
24
+ The host to connect to.
25
25
 
26
- The port to connect to.
26
+ - port=PORT
27
27
 
28
- * connect\_timeout=SECONDS
28
+ The port to connect to.
29
29
 
30
- The maximum amount of time to wait when creating a new connection
31
- to the host. Default if unspecified is 30 seconds.
30
+ - connect_timeout=SECONDS
32
31
 
33
- * timeout=SECONDS
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
- The amount of seconds to let a backend connection live idle in the
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
- * max\_connections=NUMBER
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
- Maximum number of connections to create at any given time.
41
+ - max_connections=NUMBER
42
42
 
43
- * enable\_tls=[true|yes|1]
43
+ Maximum number of connections to create at any given time.
44
44
 
45
- Enable TLS with the forward host (if supported). TLS uses options from
46
- the tls plugin.
45
+ - enable_tls=[true|yes|1]
47
46
 
48
- * auth\_type=[plain|login]
47
+ Enable TLS with the forward host (if supported). TLS uses options from
48
+ the tls plugin.
49
49
 
50
- Enable PLAIN or LOGIN SMTP AUTH. This is required to enable AUTH.
50
+ - auth_type=[plain|login]
51
51
 
52
- * auth\_user=USERNAME
52
+ Enable PLAIN or LOGIN SMTP AUTH. This is required to enable AUTH.
53
53
 
54
- SMTP AUTH username to use.
54
+ - auth_user=USERNAME
55
55
 
56
- * auth\_pass=PASSWORD
56
+ SMTP AUTH username to use.
57
57
 
58
- SMTP AUTH password to use.
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
- # rcpt\_to.in\_host\_list
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
- * host\_list
10
+ - host_list
11
11
 
12
12
  Specifies the list of hosts that are local to this server.
13
13
 
14
- * host\_list\_regex
14
+ - host_list_regex
15
15
 
16
- Specifies the list of regexes that are local to this server. Note
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
- * host\_list.anti\_spoof
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,3 +1,3 @@
1
- # rcpt\_to.max\_count
1
+ # rcpt_to.max_count
2
2
 
3
3
  The functionality of this plugin was integrated in to [haraka-plugin-limit](https://github.com/haraka/haraka-plugin-limit).
@@ -1,9 +1,9 @@
1
- # record\_envelope\_addresses
1
+ # record_envelope_addresses
2
2
 
3
3
  This plugin adds two new header lines.
4
4
 
5
- * X-Envelope-To: the envelope RCPT TO address
6
- * X-Envelope-From: the envelope MAIL FROM address
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
- # reseed\_rng
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. Worse, that version of V8 (at least) doesn't provide a way
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 init\_child event
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.
@@ -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** &rarr; `STATUS <CMD> [param1] [param2]....`
8
- - **Response** &larr; *&lt;SMTP code 211 or 500>&lt;space>&lt;json encoded response>\r\n*
8
+ - **Response** &larr; _&lt;SMTP code 211 or 500>&lt;space>&lt;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
- * `STATUS POOL LIST` - list of active pools
20
- * `STATUS QUEUE STATS` - queue statistics in format "<in_progress>/<delivery_queue length>/<temp_fail_queue length>"
21
- * `STATUS QUEUE LIST` - list of parsed queue files with *uuid, domain, mail_from, rcpt_to* attributes
22
- * `STATUS QUEUE INSPECT` - returns content of *outbound.delivery_queue* and *outbound.temp_fail_queue*
23
- * `STATUS QUEUE DISCARD file` - stop delivering email file
24
- * `STATUS QUEUE PUSH file` - try to re-deliver email immediately
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