Haraka 3.1.0 → 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 +69 -50
  4. package/Plugins.md +3 -1
  5. package/README.md +1 -1
  6. package/bin/haraka +475 -478
  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 +34 -27
  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 +38 -33
  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
package/docs/Tutorial.md CHANGED
@@ -1,5 +1,4 @@
1
- Writing Haraka Plugins
2
- ======================
1
+ # Writing Haraka Plugins
3
2
 
4
3
  Part of the joy of using Haraka as your main mail server is having a strong
5
4
  plugin based system which means you control all aspects of how your mail is
@@ -13,11 +12,10 @@ Node.js) and the world is your oyster.
13
12
 
14
13
  This tutorial will run through a simple plugin which allows you to have
15
14
  email addresses that expire in a short period of time. This is handy if you
16
- want a *disposable email address* to use to sign up for a web site that you
15
+ want a _disposable email address_ to use to sign up for a web site that you
17
16
  don't wish to continually receive communication from.
18
17
 
19
- The Design
20
- ----------
18
+ ## The Design
21
19
 
22
20
  In order to make this simple, we are going to simply let you have tagged
23
21
  email addresses such as `user-20120515@domain.com` which will expire on the
@@ -26,19 +24,17 @@ reject mails to that address after the expiry date. If the address hasn't
26
24
  expired yet it will re-write the address to `user@domain.com` before onward
27
25
  delivery.
28
26
 
29
- What You Will Need
30
- ------------------
27
+ ## What You Will Need
31
28
 
32
- * Node.js and npm
33
- * Haraka
34
- * A text editor
35
- * [swaks][1]
36
- * A screwdriver
29
+ - Node.js and npm
30
+ - Haraka
31
+ - A text editor
32
+ - [swaks][1]
33
+ - A screwdriver
37
34
 
38
35
  [1]: http://jetmore.org/john/code/swaks/
39
36
 
40
- Getting Started
41
- ---------------
37
+ ## Getting Started
42
38
 
43
39
  First install Haraka via npm if you haven't already:
44
40
 
@@ -57,56 +53,48 @@ Next, let's create a new plugin:
57
53
  This should output a bunch of information about files it has created:
58
54
 
59
55
  Plugin rcpt_to.disposable created
60
- Now edit javascript in: /path/to/new_project/plugins/rcpt_to.disposable.js
61
- Add the plugin to config: /path/to/new_project/config/plugins
62
- And edit documentation in: /path/to/new_project/docs/plugins/rcpt_to.disposable.md
56
+ Now edit javascript in: /path/to/new_project/plugins/rcpt_to.disposable.js
57
+ Add the plugin to config: /path/to/new_project/config/plugins
58
+ And edit documentation in: /path/to/new_project/docs/plugins/rcpt_to.disposable.md
63
59
 
64
- So let's do the second part now - load up the `config/plugins` file and lets
65
- set this up to test things. Comment out most of the plugins, except for
60
+ So let's do the second part now - load up the `config/plugins` file and
61
+ set it up to test. Comment out most of the plugins, except for
66
62
  `rcpt_to.in_host_list` and add in our new plugin, and change the queue
67
63
  plugin to `test_queue`. The final file should look like this:
68
64
 
69
- # default list of plugins
65
+ # default list of plugins
70
66
 
71
- # block mails from known bad hosts (see config/dnsbl.zones for the DNS zones queried)
72
- #dnsbl
67
+ #dns-lists
68
+ #data.signatures
73
69
 
74
- # allow bad mail signatures from the config/data.signatures file.
75
- #data.signatures
70
+ # block mail from some known bad HELOs - see config/helo.checks.ini for configuration
71
+ #helo.checks
76
72
 
77
- # block mail from some known bad HELOs - see config/helo.checks.ini for configuration
78
- #helo.checks
73
+ # Only accept mail where the MAIL FROM domain is resolvable to an MX record
74
+ #mail_from.is_resolvable
79
75
 
80
- # block mail from known bad email addresses you put in config/mail_from.blocklist
81
- #mail_from.blocklist
76
+ # Allow dated tagged addresses
77
+ rcpt_to.disposable
82
78
 
83
- # Only accept mail where the MAIL FROM domain is resolvable to an MX record
84
- #mail_from.is_resolvable
79
+ # Only accept mail for your personal list of hosts
80
+ rcpt_to.in_host_list
85
81
 
86
- # Allow dated tagged addresses
87
- rcpt_to.disposable
82
+ # Queue mail via qmail-queue
83
+ #queue/qmail-queue
88
84
 
89
- # Only accept mail for your personal list of hosts
90
- rcpt_to.in_host_list
85
+ test_queue
91
86
 
92
- # Queue mail via qmail-queue
93
- #queue/qmail-queue
87
+ The ordering here is important - our new plugin has to come before `rcpt_to.in_host_list`.
94
88
 
95
- test_queue
96
-
97
- Remember that the ordering here is important - our new plugin has to come
98
- before `rcpt_to.in_host_list`.
99
-
100
- Now fire up your favourite editor and put the following into
101
- the `plugins/rcpt_to.disposable.js` file:
89
+ Fire up your favourite editor and put the following into the `plugins/rcpt_to.disposable.js` file:
102
90
 
103
91
  exports.hook_rcpt = function (next, connection, params) {
104
- var rcpt = params[0];
105
- this.loginfo("Got recipient: " + rcpt);
106
- next();
107
- }
92
+ const rcpt = params[0];
93
+ this.loginfo("Got recipient: " + rcpt);
94
+ next();
95
+ }
108
96
 
109
- All we are doing here is logging the fact that we got the recipient.
97
+ Here we log that we got the recipient.
110
98
 
111
99
  Check this works. You'll need two terminal windows. In window 1:
112
100
 
@@ -126,29 +114,28 @@ In the logs you should see:
126
114
  Which indicates everything is working. You should also have a file
127
115
  `/tmp/mail.eml` containing the email that swaks sent.
128
116
 
129
- Parsing Out The Date
130
- --------------------
117
+ ## Parsing Out The Date
131
118
 
132
- Now lets check for emails with an expire date in them and turn them into
119
+ Now check for emails with an expire date in them and turn them into
133
120
  `Date` objects. Edit your plugin file as follows:
134
121
 
135
122
  exports.hook_rcpt = function (next, connection, params) {
136
- var rcpt = params[0];
137
- this.loginfo("Got recipient: " + rcpt);
138
-
139
- // Check user matches regex 'user-YYYYMMDD':
140
- var match = /^(.*)-(\d{4})(\d{2})(\d{2})$/.exec(rcpt.user);
141
- if (!match) {
142
- return next();
143
- }
144
-
145
- // get date - note Date constructor takes month-1 (i.e. Dec == 11).
146
- var expiry_date = new Date(match[2], match[3]-1, match[4]);
147
-
148
- this.loginfo("Email expires on: " + expiry_date);
149
-
150
- next();
151
- }
123
+ var rcpt = params[0];
124
+ this.loginfo("Got recipient: " + rcpt);
125
+
126
+ // Check user matches regex 'user-YYYYMMDD':
127
+ var match = /^(.*)-(\d{4})(\d{2})(\d{2})$/.exec(rcpt.user);
128
+ if (!match) {
129
+ return next();
130
+ }
131
+
132
+ // get date - note Date constructor takes month-1 (i.e. Dec == 11).
133
+ var expiry_date = new Date(match[2], match[3]-1, match[4]);
134
+
135
+ this.loginfo("Email expires on: " + expiry_date);
136
+
137
+ next();
138
+ }
152
139
 
153
140
  Start haraka again and pass it the following email via swaks:
154
141
 
@@ -163,61 +150,59 @@ And you should see now in the logs:
163
150
  The exact time may vary depending on your timezone, but it should be obvious
164
151
  we now have a date object, which we can now compare to the current date.
165
152
 
166
- Rejecting Expired Emails
167
- ------------------------
153
+ ## Rejecting Expired Emails
168
154
 
169
155
  The next edit we have to do is to add in code to compare to the current date
170
156
  and reject expired emails. Again, this is very simple:
171
157
 
172
- exports.hook_rcpt = function (next, connection, params) {
173
- var rcpt = params[0];
174
- this.loginfo("Got recipient: " + rcpt);
175
-
176
- // Check user matches regex 'user-YYYYMMDD':
177
- var match = /^(.*)-(\d{4})(\d{2})(\d{2})$/.exec(rcpt.user);
178
- if (!match) {
179
- return next();
180
- }
181
-
182
- // get date - note Date constructor takes month-1 (i.e. Dec == 11).
183
- var expiry_date = new Date(match[2], match[3]-1, match[4]);
184
-
185
- this.loginfo("Email expires on: " + expiry_date);
186
-
187
- var today = new Date();
188
-
189
- if (expiry_date < today) {
190
- // If we get here, the email address has expired
191
- return next(DENY, "Expired email address");
192
- }
193
-
194
- next();
195
- }
158
+ exports.hook_rcpt = function (next, connection, params) {
159
+ var rcpt = params[0];
160
+ this.loginfo("Got recipient: " + rcpt);
161
+
162
+ // Check user matches regex 'user-YYYYMMDD':
163
+ var match = /^(.*)-(\d{4})(\d{2})(\d{2})$/.exec(rcpt.user);
164
+ if (!match) {
165
+ return next();
166
+ }
167
+
168
+ // get date - note Date constructor takes month-1 (i.e. Dec == 11).
169
+ var expiry_date = new Date(match[2], match[3]-1, match[4]);
170
+
171
+ this.loginfo("Email expires on: " + expiry_date);
172
+
173
+ var today = new Date();
174
+
175
+ if (expiry_date < today) {
176
+ // If we get here, the email address has expired
177
+ return next(DENY, "Expired email address");
178
+ }
179
+
180
+ next();
181
+ }
196
182
 
197
183
  And we can easily check that with swaks (remember to restart Haraka):
198
184
 
199
185
  $ swaks -h foo.com -t booya-20110101@haraka.local -f somewhere@example.com \
200
186
  -s localhost -p 25
201
- === Trying localhost:25...
202
- === Connected to localhost.
203
- <- 220 sergeant.org ESMTP Haraka 0.3 ready
204
- -> EHLO foo.com
205
- <- 250-Haraka says hi Unknown [127.0.0.1]
206
- <- 250-PIPELINING
207
- <- 250-8BITMIME
208
- <- 250 SIZE 500000
209
- -> MAIL FROM:<somewhere@example.com>
210
- <- 250 From address is OK
211
- -> RCPT TO:<booya-20110101@haraka.local>
212
- <** 550 Expired email address
213
- -> QUIT
214
- <- 221 closing connection. Have a jolly good day.
215
- === Connection closed with remote host.
187
+ === Trying localhost:25...
188
+ === Connected to localhost.
189
+ <- 220 sergeant.org ESMTP Haraka 0.3 ready
190
+ -> EHLO foo.com
191
+ <- 250-Haraka says hi Unknown [127.0.0.1]
192
+ <- 250-PIPELINING
193
+ <- 250-8BITMIME
194
+ <- 250 SIZE 500000
195
+ -> MAIL FROM:<somewhere@example.com>
196
+ <- 250 From address is OK
197
+ -> RCPT TO:<booya-20110101@haraka.local>
198
+ <** 550 Expired email address
199
+ -> QUIT
200
+ <- 221 closing connection. Have a jolly good day.
201
+ === Connection closed with remote host.
216
202
 
217
203
  Now we need to do one more thing...
218
204
 
219
- Fixing Up Unexpired Emails
220
- --------------------------
205
+ ## Fixing Up Unexpired Emails
221
206
 
222
207
  The last thing we need to do, is if we have an email that isn't expired, we
223
208
  need to normalise it back to the real email address, because wherever we
@@ -225,34 +210,34 @@ deliver this to is unlikely to recognise these new email addresses.
225
210
 
226
211
  Here's how our final plugin will look:
227
212
 
228
- exports.hook_rcpt = function (next, connection, params) {
229
- var rcpt = params[0];
230
- this.loginfo("Got recipient: " + rcpt);
231
-
232
- // Check user matches regex 'user-YYYYMMDD':
233
- var match = /^(.*)-(\d{4})(\d{2})(\d{2})$/.exec(rcpt.user);
234
- if (!match) {
235
- return next();
236
- }
237
-
238
- // get date - note Date constructor takes month-1 (i.e. Dec == 11).
239
- var expiry_date = new Date(match[2], match[3]-1, match[4]);
240
-
241
- this.loginfo("Email expires on: " + expiry_date);
242
-
243
- var today = new Date();
244
-
245
- if (expiry_date < today) {
246
- // If we get here, the email address has expired
247
- return next(DENY, "Expired email address");
248
- }
249
-
250
- // now get rid of the extension:
251
- rcpt.user = match[1];
252
- this.loginfo("Email address now: " + rcpt);
253
-
254
- next();
255
- }
213
+ exports.hook_rcpt = function (next, connection, params) {
214
+ var rcpt = params[0];
215
+ this.loginfo("Got recipient: " + rcpt);
216
+
217
+ // Check user matches regex 'user-YYYYMMDD':
218
+ var match = /^(.*)-(\d{4})(\d{2})(\d{2})$/.exec(rcpt.user);
219
+ if (!match) {
220
+ return next();
221
+ }
222
+
223
+ // get date - note Date constructor takes month-1 (i.e. Dec == 11).
224
+ var expiry_date = new Date(match[2], match[3]-1, match[4]);
225
+
226
+ this.loginfo("Email expires on: " + expiry_date);
227
+
228
+ var today = new Date();
229
+
230
+ if (expiry_date < today) {
231
+ // If we get here, the email address has expired
232
+ return next(DENY, "Expired email address");
233
+ }
234
+
235
+ // now get rid of the extension:
236
+ rcpt.user = match[1];
237
+ this.loginfo("Email address now: " + rcpt);
238
+
239
+ next();
240
+ }
256
241
 
257
242
  And when we test this with an unexpired address via swaks:
258
243
 
@@ -261,14 +246,13 @@ And when we test this with an unexpired address via swaks:
261
246
 
262
247
  We get in the logs:
263
248
 
264
- [INFO] [rcpt_to.disposable] Got recipient: <booya-20120101@haraka.local>
265
- [INFO] [rcpt_to.disposable] Email expires on: Sun Jan 01 2012 00:00:00 GMT-0500 (EST)
266
- [INFO] [rcpt_to.disposable] Email address now: <booya@haraka.local>
249
+ [INFO] [rcpt_to.disposable] Got recipient: <booya-20120101@haraka.local>
250
+ [INFO] [rcpt_to.disposable] Email expires on: Sun Jan 01 2012 00:00:00 GMT-0500 (EST)
251
+ [INFO] [rcpt_to.disposable] Email address now: <booya@haraka.local>
267
252
 
268
253
  Which indicates that we have successfully modified the email address.
269
254
 
270
- Further Reading
271
- ===============
255
+ # Further Reading
272
256
 
273
257
  There are many more features of the Haraka API to explore, including access
274
258
  to the body of the email and the headers, access to the HELO string, and
@@ -1,4 +1,3 @@
1
1
  # access - ACLs
2
2
 
3
3
  Repackaged as [haraka-plugin-access](https://github.com/haraka/haraka-plugin-access).
4
-
@@ -1,10 +1,9 @@
1
- backscatterer
2
- =============
1
+ # backscatterer
3
2
 
4
3
  This is a very basic pluign that checks the connecting IP against
5
4
  ips.backscatterer.org when the envelope-from is null or postmaster@
6
5
  as per the instructions at http://www.backscatterer.org/?target=usage
7
6
 
8
7
  This plugin is used to reject misdirected bounces and autoresponders
9
- and sender callouts from abusive systems which can happen when a
8
+ and sender callouts from abusive systems which can happen when a
10
9
  local domain is spoofed and used as the envelope-from in a spam run.
@@ -3,60 +3,51 @@
3
3
  See [haraka-plugin-access](https://github.com/haraka/haraka-plugin-access)
4
4
  for upgrade instructions.
5
5
 
6
-
7
- connect.rdns\_access
8
- ===================
9
-
6
+ # connect.rdns_access
10
7
 
11
8
  This plugin will evaluate the remote IP address and the remote rDNS hostname
12
- against a set of white and black lists. The lists are applied in the following
9
+ against a set of white and black lists. The lists are applied in the following
13
10
  way:
14
11
 
15
- connect.rdns\_access.whitelist (pass)
16
- connect.rdns\_access.whitelist\_regex (pass)
17
- connect.rdns\_access.blacklist (block)
18
- connect.rdns\_access.blacklist\_regex (block)
12
+ connect.rdns_access.whitelist (pass)
13
+ connect.rdns_access.whitelist_regex (pass)
14
+ connect.rdns_access.blacklist (block)
15
+ connect.rdns_access.blacklist_regex (block)
19
16
 
20
- Configuration connect.rdns\_access.ini
21
- -------------------------------------
17
+ ## Configuration connect.rdns_access.ini
22
18
 
23
19
  General configuration file for this plugin.
24
20
 
25
- * connect.rdns\_access.general.deny\_msg
21
+ - connect.rdns_access.general.deny_msg
26
22
 
27
23
  Text to send the user on reject (text).
28
24
 
29
-
30
- Configuration connect.rdns\_access.whitelist
31
- -------------------------------------------
25
+ ## Configuration connect.rdns_access.whitelist
32
26
 
33
27
  The whitelist is mostly to counter blacklist entries that match more than
34
- what one would want. This file should be used for a specific IP address
28
+ what one would want. This file should be used for a specific IP address
35
29
  or rDNS hostnames, one per line, that should bypass blacklist checks.
36
30
  NOTE: We heavily suggest tailoring blacklist entries to be as accurate as
37
- possible and never using whitelists. Nevertheless, if you need whitelists,
31
+ possible and never using whitelists. Nevertheless, if you need whitelists,
38
32
  here they are.
39
33
 
40
- Configuration connect.rdns\_access.whitelist\_regex
41
- -------------------------------------------------
34
+ ## Configuration connect.rdns_access.whitelist_regex
42
35
 
43
36
  Does the same thing as the whitelist file, but each line is a regex.
44
37
  Each line is also anchored for you, meaning '^' + regex + '$' is added for
45
- you. If you need to get around this restriction, you may use a '.*' at
46
- either the start or the end of your regex. This should help prevent people
38
+ you. If you need to get around this restriction, you may use a '.\*' at
39
+ either the start or the end of your regex. This should help prevent people
47
40
  from writing overly permissive rules on accident.
48
41
 
49
- Configuration connect.rdns\_access.blacklist
50
- -------------------------------------------
42
+ ## Configuration connect.rdns_access.blacklist
51
43
 
52
44
  This file should be used for a specific IP address or rDNS hostnames, one
53
45
  per line, that should fail on connect.
54
46
 
55
- Configuration connect.rdns\_access.blacklist\_regex
56
- -------------------------------------------------
47
+ ## Configuration connect.rdns_access.blacklist_regex
57
48
 
58
49
  Does the same thing as the blacklist file, but each line is a regex.
59
50
  Each line is also anchored for you, meaning '^' + regex + '$' is added for
60
- you. If you need to get around this restriction, you may use a '.*' at
61
- either the start or the end of your regex. This should help prevent people
51
+ you. If you need to get around this restriction, you may use a '.\*' at
52
+ either the start or the end of your regex. This should help prevent people
62
53
  from writing overly permissive rules on accident.
@@ -1,4 +1,3 @@
1
1
  # data.headers
2
2
 
3
3
  Deprecated by [haraka-plugin-headers](https://github.com/haraka/haraka-plugin-headers/)
4
-
@@ -1,5 +1,4 @@
1
- data.nomsgid
2
- ============
1
+ # data.nomsgid
3
2
 
4
3
  NOTICE: this plugin is deprecated. Use data.headers instead.
5
4
 
@@ -1,5 +1,4 @@
1
- data.noreceived
2
- ===============
1
+ # data.noreceived
3
2
 
4
3
  NOTICE: this plugin is deprecated. Use data.headers instead.
5
4
 
@@ -1,5 +1,4 @@
1
- data.rfc5322\_header\_checks
2
- ==========================
1
+ # data.rfc5322_header_checks
3
2
 
4
3
  NOTICE: this plugin is deprecated. Use data.headers instead.
5
4
 
@@ -2,8 +2,7 @@
2
2
 
3
3
  This plugin implements the [DKIM Core specification](dkimcore.org).
4
4
 
5
- This plugin only *signs* outbound messages. It does not validate DKIM signatures.
6
-
5
+ This plugin only _signs_ outbound messages. It does not validate DKIM signatures.
7
6
 
8
7
  ## Getting Started
9
8
 
@@ -38,35 +37,32 @@ The values in the address have the following meaning:
38
37
  services: s=[email]
39
38
  keytypes: [ rsa ]
40
39
 
41
-
42
40
  ## Key size
43
41
 
44
42
  The default key size created by `dkim_key_gen.sh` is 2048. That is considered secure as of mid-2014 but after 2020, you should be using 4096.
45
43
 
46
44
  # What to sign
47
45
 
48
- The DKIM signing key for messages from example.org *should* be signed with
49
- a DKIM key for example.org. Failing to do so will result in messages not
50
- having an *aligned* DKIM signature. For DMARC enabled domains, this will
46
+ The DKIM signing key for messages from example.org _should_ be signed with
47
+ a DKIM key for example.org. Failing to do so will result in messages not
48
+ having an _aligned_ DKIM signature. For DMARC enabled domains, this will
51
49
  likely result in deliverability problems.
52
50
 
53
51
  For correct alignment, Haraka signs each message with that domains DKIM key.
54
52
  For an alternative, see the legacy Single Domain Configuration below.
55
53
 
56
-
57
54
  # Configuration
58
55
 
59
56
  This plugin is configured in `dkim_sign.ini`.
60
57
 
61
- - disabled = [ 1 | true | yes ] (OPTIONAL)
62
-
63
- Set this to disable DKIM signing
58
+ - disabled = [ 1 | true | yes ] (OPTIONAL)
64
59
 
65
- - headers\_to\_sign = list, of; headers (REQUIRED)
60
+ Set this to disable DKIM signing
66
61
 
67
- Set this to the list of headers that should be signed, separated by commas, colons or semi-colons. Signing prevents tampering with the specified headers.
68
- The 'From' header is required by the RFC and will be added if missing.
62
+ - headers_to_sign = list, of; headers (REQUIRED)
69
63
 
64
+ Set this to the list of headers that should be signed, separated by commas, colons or semi-colons. Signing prevents tampering with the specified headers.
65
+ The 'From' header is required by the RFC and will be added if missing.
70
66
 
71
67
  ## Single Domain Configuration
72
68
 
@@ -74,13 +70,13 @@ To sign all messages with a single DKIM key, you must set the selector and domai
74
70
 
75
71
  - selector = name
76
72
 
77
- Set this to the selector name published in DNS under the
78
- \_domainkey sub-domain of the domain referenced below.
73
+ Set this to the selector name published in DNS under the
74
+ \_domainkey sub-domain of the domain referenced below.
79
75
 
80
76
  - domain = name
81
77
 
82
- Set this to the domain name that will be used to sign messages
83
- which don't match a per-domain DKIM key. The DNS TXT entry for:
78
+ Set this to the domain name that will be used to sign messages
79
+ which don't match a per-domain DKIM key. The DNS TXT entry for:
84
80
 
85
81
  <selector>._domainkey.<domain>
86
82
 
@@ -1,36 +1,28 @@
1
- dkim_verify
2
- ===========
1
+ # dkim_verify
3
2
 
4
3
  This plugin will verify DKIM signatures as defined by RFC 6376 and add
5
4
  an Authentication-Results header as appropriate.
6
5
 
6
+ ## Configuration
7
7
 
8
- Configuration
9
- -------------
8
+ - allowed_time_skew
10
9
 
11
- * allowed_time_skew
12
-
13
10
  How far can we stretch on time matching, in secs. Useful when clock is skewed.
14
11
 
15
- * sigerror_log_level
12
+ - sigerror_log_level
16
13
 
17
-
14
+ ## Testing
18
15
 
19
- Testing
20
- -------
21
-
22
- This plugin also provides a command-line test tool that can be used to
16
+ This plugin also provides a command-line test tool that can be used to
23
17
  debug DKIM issues or to check results.
24
18
 
25
- ````
19
+ ```
26
20
  # dkimverify < message
27
21
  identity="@gmail.com" domain="gmail.com" result=pass
28
- ````
22
+ ```
29
23
 
30
24
  You can add `--debug` to the option arguments to see a full trace of the processing.
31
25
 
32
-
33
- Notes
34
- -----
26
+ ## Notes
35
27
 
36
28
  This plugin and underlying library does not currently support DKIM body length limits (l=).