Haraka 3.0.3 → 3.0.5

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 (239) hide show
  1. package/.eslintrc.yaml +4 -9
  2. package/CONTRIBUTORS.md +11 -0
  3. package/Changes.md +1397 -1213
  4. package/Plugins.md +117 -105
  5. package/README.md +4 -13
  6. package/bin/haraka +198 -298
  7. package/config/auth_flat_file.ini +1 -0
  8. package/config/dhparams.pem +8 -0
  9. package/config/mail_from.is_resolvable.ini +4 -2
  10. package/config/me +1 -0
  11. package/config/outbound.ini +0 -2
  12. package/config/plugins +35 -36
  13. package/config/smtp.ini +1 -1
  14. package/config/smtp.json +17 -0
  15. package/config/tls.ini +2 -0
  16. package/config/tls_cert.pem +23 -0
  17. package/config/tls_key.pem +28 -0
  18. package/connection.js +46 -73
  19. package/contrib/bsd-rc.d/haraka +3 -1
  20. package/contrib/plugin2npm.sh +6 -36
  21. package/docs/CoreConfig.md +2 -2
  22. package/docs/Logging.md +7 -21
  23. package/docs/Outbound.md +104 -201
  24. package/docs/Plugins.md +2 -2
  25. package/docs/Transaction.md +59 -82
  26. package/docs/plugins/queue/smtp_proxy.md +5 -10
  27. package/docs/plugins/tls.md +37 -9
  28. package/endpoint.js +16 -13
  29. package/haraka.js +10 -14
  30. package/host_pool.js +5 -5
  31. package/http/html/index.html +6 -5
  32. package/line_socket.js +3 -4
  33. package/logger.js +44 -28
  34. package/outbound/client_pool.js +27 -23
  35. package/outbound/config.js +4 -6
  36. package/outbound/fsync_writestream.js +1 -1
  37. package/outbound/hmail.js +178 -218
  38. package/outbound/index.js +86 -99
  39. package/outbound/qfile.js +1 -1
  40. package/outbound/queue.js +51 -44
  41. package/outbound/timer_queue.js +3 -2
  42. package/outbound/tls.js +19 -7
  43. package/package.json +60 -51
  44. package/plugins/.eslintrc.yaml +0 -6
  45. package/plugins/auth/auth_base.js +4 -2
  46. package/plugins/auth/auth_proxy.js +14 -12
  47. package/plugins/auth/auth_vpopmaild.js +1 -1
  48. package/plugins/block_me.js +1 -1
  49. package/plugins/data.signatures.js +2 -4
  50. package/plugins/early_talker.js +2 -1
  51. package/plugins/mail_from.is_resolvable.js +65 -135
  52. package/plugins/queue/deliver.js +4 -5
  53. package/plugins/queue/lmtp.js +11 -12
  54. package/plugins/queue/qmail-queue.js +2 -2
  55. package/plugins/queue/quarantine.js +2 -2
  56. package/plugins/queue/rabbitmq.js +16 -17
  57. package/plugins/queue/smtp_forward.js +3 -3
  58. package/plugins/queue/smtp_proxy.js +10 -1
  59. package/plugins/queue/test.js +2 -2
  60. package/plugins/rcpt_to.host_list_base.js +5 -5
  61. package/plugins/rcpt_to.in_host_list.js +2 -2
  62. package/plugins/relay.js +6 -7
  63. package/plugins/reseed_rng.js +1 -1
  64. package/plugins/status.js +37 -33
  65. package/plugins/tls.js +2 -2
  66. package/plugins/xclient.js +3 -2
  67. package/plugins.js +50 -54
  68. package/run_tests +3 -30
  69. package/server.js +190 -190
  70. package/smtp_client.js +30 -23
  71. package/{tests → test}/config/plugins +0 -2
  72. package/{tests → test}/config/smtp.ini +3 -1
  73. package/test/config/tls/example.com/_.example.com.key +28 -0
  74. package/test/config/tls/example.com/example.com.crt +25 -0
  75. package/{tests/loud → test}/config/tls.ini +4 -2
  76. package/test/connection.js +302 -0
  77. package/test/endpoint.js +94 -0
  78. package/{tests → test}/fixtures/line_socket.js +1 -1
  79. package/{tests → test}/fixtures/util_hmailitem.js +19 -25
  80. package/{tests → test}/host_pool.js +42 -57
  81. package/test/logger.js +258 -0
  82. package/test/outbound/hmail.js +141 -0
  83. package/test/outbound/index.js +220 -0
  84. package/test/outbound/qfile.js +126 -0
  85. package/test/outbound_bounce_net_errors.js +142 -0
  86. package/{tests → test}/outbound_bounce_rfc3464.js +110 -122
  87. package/test/plugins/auth/auth_base.js +484 -0
  88. package/test/plugins/auth/auth_vpopmaild.js +83 -0
  89. package/test/plugins/early_talker.js +104 -0
  90. package/test/plugins/mail_from.is_resolvable.js +35 -0
  91. package/test/plugins/queue/smtp_forward.js +206 -0
  92. package/test/plugins/rcpt_to.host_list_base.js +122 -0
  93. package/test/plugins/rcpt_to.in_host_list.js +193 -0
  94. package/test/plugins/relay.js +303 -0
  95. package/test/plugins/status.js +130 -0
  96. package/test/plugins/tls.js +70 -0
  97. package/test/plugins.js +228 -0
  98. package/test/rfc1869.js +73 -0
  99. package/test/server.js +491 -0
  100. package/test/smtp_client.js +299 -0
  101. package/test/tls_socket.js +277 -0
  102. package/test/transaction.js +270 -0
  103. package/tls_socket.js +202 -252
  104. package/transaction.js +8 -23
  105. package/CONTRIBUTING.md +0 -1
  106. package/bin/dkimverify +0 -40
  107. package/config/access.domains +0 -13
  108. package/config/attachment.ctype.regex +0 -2
  109. package/config/attachment.filename.regex +0 -1
  110. package/config/avg.ini +0 -5
  111. package/config/bounce.ini +0 -15
  112. package/config/data.headers.ini +0 -61
  113. package/config/dkim/dkim_key_gen.sh +0 -78
  114. package/config/dkim_sign.ini +0 -4
  115. package/config/dkim_verify.ini +0 -7
  116. package/config/dnsbl.ini +0 -23
  117. package/config/greylist.ini +0 -43
  118. package/config/helo.checks.ini +0 -52
  119. package/config/messagesniffer.ini +0 -18
  120. package/config/spamassassin.ini +0 -56
  121. package/dkim.js +0 -614
  122. package/docs/plugins/avg.md +0 -35
  123. package/docs/plugins/bounce.md +0 -69
  124. package/docs/plugins/clamd.md +0 -147
  125. package/docs/plugins/esets.md +0 -8
  126. package/docs/plugins/greylist.md +0 -90
  127. package/docs/plugins/helo.checks.md +0 -135
  128. package/docs/plugins/messagesniffer.md +0 -163
  129. package/docs/plugins/spamassassin.md +0 -180
  130. package/outbound/mx_lookup.js +0 -70
  131. package/plugins/auth/auth_ldap.js +0 -3
  132. package/plugins/avg.js +0 -162
  133. package/plugins/backscatterer.js +0 -25
  134. package/plugins/bounce.js +0 -381
  135. package/plugins/clamd.js +0 -382
  136. package/plugins/data.uribl.js +0 -4
  137. package/plugins/dkim_sign.js +0 -395
  138. package/plugins/dkim_verify.js +0 -62
  139. package/plugins/dns_list_base.js +0 -221
  140. package/plugins/dnsbl.js +0 -146
  141. package/plugins/dnswl.js +0 -58
  142. package/plugins/esets.js +0 -71
  143. package/plugins/graph.js +0 -5
  144. package/plugins/greylist.js +0 -645
  145. package/plugins/helo.checks.js +0 -533
  146. package/plugins/messagesniffer.js +0 -381
  147. package/plugins/rcpt_to.ldap.js +0 -3
  148. package/plugins/rcpt_to.max_count.js +0 -24
  149. package/plugins/spamassassin.js +0 -384
  150. package/tests/config/dkim/example.com/dns +0 -29
  151. package/tests/config/dkim/example.com/private +0 -6
  152. package/tests/config/dkim/example.com/public +0 -4
  153. package/tests/config/dkim/example.com/selector +0 -1
  154. package/tests/config/dkim.private.key +0 -6
  155. package/tests/config/dkim_sign.ini +0 -4
  156. package/tests/config/helo.checks.ini +0 -52
  157. package/tests/connection.js +0 -327
  158. package/tests/endpoint.js +0 -128
  159. package/tests/fixtures/vm_harness.js +0 -59
  160. package/tests/logger.js +0 -327
  161. package/tests/outbound/hmail.js +0 -112
  162. package/tests/outbound/index.js +0 -324
  163. package/tests/outbound/qfile.js +0 -67
  164. package/tests/outbound_bounce_net_errors.js +0 -173
  165. package/tests/plugins/auth/auth_base.js +0 -463
  166. package/tests/plugins/auth/auth_vpopmaild.js +0 -91
  167. package/tests/plugins/bounce.js +0 -307
  168. package/tests/plugins/clamd.js +0 -224
  169. package/tests/plugins/deprecated/relay_acl.js +0 -140
  170. package/tests/plugins/deprecated/relay_all.js +0 -59
  171. package/tests/plugins/dkim_sign.js +0 -315
  172. package/tests/plugins/dkim_signer.js +0 -108
  173. package/tests/plugins/dns_list_base.js +0 -259
  174. package/tests/plugins/dnsbl.js +0 -101
  175. package/tests/plugins/early_talker.js +0 -115
  176. package/tests/plugins/greylist.js +0 -58
  177. package/tests/plugins/helo.checks.js +0 -525
  178. package/tests/plugins/mail_from.is_resolvable.js +0 -116
  179. package/tests/plugins/queue/smtp_forward.js +0 -221
  180. package/tests/plugins/rcpt_to.host_list_base.js +0 -132
  181. package/tests/plugins/rcpt_to.in_host_list.js +0 -218
  182. package/tests/plugins/relay.js +0 -339
  183. package/tests/plugins/spamassassin.js +0 -171
  184. package/tests/plugins/status.js +0 -138
  185. package/tests/plugins/tls.js +0 -84
  186. package/tests/plugins.js +0 -247
  187. package/tests/rfc1869.js +0 -61
  188. package/tests/server.js +0 -510
  189. package/tests/smtp_client/auth.js +0 -105
  190. package/tests/smtp_client/basic.js +0 -101
  191. package/tests/smtp_client.js +0 -80
  192. package/tests/tls_socket.js +0 -333
  193. package/tests/transaction.js +0 -284
  194. /package/docs/{plugins → deprecated}/dkim_sign.md +0 -0
  195. /package/docs/{plugins → deprecated}/dkim_verify.md +0 -0
  196. /package/docs/{plugins → deprecated}/dnsbl.md +0 -0
  197. /package/docs/{plugins → deprecated}/dnswl.md +0 -0
  198. /package/{tests → test}/.eslintrc.yaml +0 -0
  199. /package/{tests → test}/config/auth_flat_file.ini +0 -0
  200. /package/{tests → test}/config/dhparams.pem +0 -0
  201. /package/{tests → test}/config/host_list +0 -0
  202. /package/{tests → test}/config/outbound_tls_cert.pem +0 -0
  203. /package/{tests → test}/config/outbound_tls_key.pem +0 -0
  204. /package/{tests → test}/config/smtp_forward.ini +0 -0
  205. /package/{tests → test}/config/tls/ec.pem +0 -0
  206. /package/{tests → test}/config/tls/haraka.local.pem +0 -0
  207. /package/{tests → test}/config/tls/mismatched.pem +0 -0
  208. /package/{tests → test}/config/tls_cert.pem +0 -0
  209. /package/{tests → test}/config/tls_key.pem +0 -0
  210. /package/{tests → test}/fixtures/todo_qfile.txt +0 -0
  211. /package/{tests → test}/installation/config/test-plugin-flat +0 -0
  212. /package/{tests → test}/installation/config/test-plugin.ini +0 -0
  213. /package/{tests → test}/installation/config/tls.ini +0 -0
  214. /package/{tests → test}/installation/node_modules/load_first/index.js +0 -0
  215. /package/{tests → test}/installation/node_modules/load_first/package.json +0 -0
  216. /package/{tests → test}/installation/node_modules/test-plugin/config/test-plugin-flat +0 -0
  217. /package/{tests → test}/installation/node_modules/test-plugin/config/test-plugin.ini +0 -0
  218. /package/{tests → test}/installation/node_modules/test-plugin/package.json +0 -0
  219. /package/{tests → test}/installation/node_modules/test-plugin/test-plugin.js +0 -0
  220. /package/{tests → test}/installation/plugins/base_plugin.js +0 -0
  221. /package/{tests → test}/installation/plugins/folder_plugin/index.js +0 -0
  222. /package/{tests → test}/installation/plugins/folder_plugin/package.json +0 -0
  223. /package/{tests → test}/installation/plugins/inherits.js +0 -0
  224. /package/{tests → test}/installation/plugins/load_first.js +0 -0
  225. /package/{tests → test}/installation/plugins/plugin.js +0 -0
  226. /package/{tests → test}/installation/plugins/tls.js +0 -0
  227. /package/{tests → test}/loud/config/dhparams.pem +0 -0
  228. /package/{tests → test}/loud/config/tls/goobered.pem +0 -0
  229. /package/{tests → test/loud}/config/tls.ini +0 -0
  230. /package/{tests → test}/mail_specimen/base64-root-part.txt +0 -0
  231. /package/{tests → test}/mail_specimen/varied-fold-lengths-preserve-data.txt +0 -0
  232. /package/{tests → test}/queue/1507509981169_1507509981169_0_61403_e0Y0Ym_1_fixed +0 -0
  233. /package/{tests → test}/queue/1507509981169_1507509981169_0_61403_e0Y0Ym_1_haraka +0 -0
  234. /package/{tests → test}/queue/1508269674999_1508269674999_0_34002_socVUF_1_haraka +0 -0
  235. /package/{tests → test}/queue/1508455115683_1508455115683_0_90253_9Q4o4V_1_haraka +0 -0
  236. /package/{tests → test}/queue/multibyte +0 -0
  237. /package/{tests → test}/queue/plain +0 -0
  238. /package/{tests → test}/queue/zero-length +0 -0
  239. /package/{tests → test}/test-queue/delete-me +0 -0
package/transaction.js CHANGED
@@ -1,20 +1,16 @@
1
1
  'use strict';
2
2
  // An SMTP Transaction
3
3
 
4
- // node.js built-in modules
5
- const util = require('util');
4
+ const util = require('node:util');
6
5
 
7
- // haraka npm modules
8
6
  const Notes = require('haraka-notes');
9
7
  const utils = require('haraka-utils');
10
-
11
- // Haraka modules
12
8
  const message = require('haraka-email-message')
13
9
 
14
10
  class Transaction {
15
- constructor (uuid, cfg) {
11
+ constructor (uuid, cfg = {}) {
16
12
  this.uuid = uuid || utils.uuid();
17
- this.cfg = cfg || load_smtp_ini();
13
+ this.cfg = cfg;
18
14
  this.mail_from = null;
19
15
  this.rcpt_to = [];
20
16
  this.header_lines = [];
@@ -50,14 +46,13 @@ class Transaction {
50
46
 
51
47
  this.body = new message.Body(this.header);
52
48
  this.body.on('mime_boundary', m => this.incr_mime_count());
53
- this.attachment_start_hooks.forEach(h => {
54
- this.body.on('attachment_start', h);
55
- });
56
49
 
57
- if (this.banner) {
58
- this.body.set_banner(this.banner);
50
+ for (const hook of this.attachment_start_hooks) {
51
+ this.body.on('attachment_start', hook);
59
52
  }
60
53
 
54
+ if (this.banner) this.body.set_banner(this.banner);
55
+
61
56
  for (const o of this.body_filters) {
62
57
  this.body.add_filter((ct, enc, buf) => {
63
58
  const re_match = (util.types.isRegExp(o.ct_match) && o.ct_match.test(ct.toLowerCase()));
@@ -147,7 +142,7 @@ class Transaction {
147
142
  }
148
143
  else if (this.header_pos === 0) {
149
144
  // Build up headers
150
- if (this.header_lines.length < this.cfg.headers.max_lines) {
145
+ if (this.header_lines.length < (this.cfg?.headers?.max_lines || 1000)) {
151
146
  if (line[0] === 0x2E) line = line.slice(1); // Strip leading '.'
152
147
  this.header_lines.push(line.toString(this.encoding).replace(/\r\n$/, '\n'));
153
148
  }
@@ -255,13 +250,3 @@ exports.Transaction = Transaction;
255
250
  exports.createTransaction = (uuid, cfg) => {
256
251
  return new Transaction(uuid, cfg);
257
252
  }
258
-
259
- // sunset after test-fixtures createTransaction() is updated to pass in cfg
260
- function load_smtp_ini () {
261
- const config = require('haraka-config');
262
- const cfg = config.get('smtp.ini', { booleans: [ '+headers.add_received' ] });
263
- if (!cfg.headers.max_lines) {
264
- cfg.headers.max_lines = parseInt(config.get('max_header_lines')) || 1000;
265
- }
266
- return cfg;
267
- }
package/CONTRIBUTING.md DELETED
@@ -1 +0,0 @@
1
- See https://github.com/haraka/Haraka/wiki/Contributing
package/bin/dkimverify DELETED
@@ -1,40 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // DKIM test tool
4
-
5
- const nopt = require('nopt');
6
- const path = require('path');
7
- const base_path = path.join(__dirname, '..');
8
- const dkim = require(`${base_path}/dkim`);
9
- const DKIMVerifyStream = dkim.DKIMVerifyStream;
10
-
11
- const parsed = nopt({ 'debug': Boolean, 'time_skew': Number, 'help': Boolean });
12
-
13
- function print_usage () {
14
- console.log('Usage: dkimverify [--debug] [--time_skew=123] < message');
15
- process.exit(1);
16
- }
17
-
18
- if (parsed.help) print_usage()
19
-
20
- if (!parsed.debug) {
21
- dkim.DKIMObject.prototype.debug = function (str) {}
22
- DKIMVerifyStream.prototype.debug = function (str) {}
23
- }
24
-
25
- const opts = {}
26
- if (parsed.time_skew) opts.allowed_time_skew = parsed.time_skew
27
-
28
- const verifier = new DKIMVerifyStream(opts, (err, result, results) => {
29
- if (err) console.log(err.message);
30
- if (Array.isArray(results)) {
31
- results.forEach(function (res) {
32
- console.log(`identity="${res.identity}" domain="${res.domain}" result=${res.result} ${(res.error) ? `(${res.error})` : ''}`);
33
- });
34
- }
35
- else {
36
- console.log(`Result: ${result}`);
37
- }
38
- });
39
-
40
- process.stdin.pipe(verifier);
@@ -1,13 +0,0 @@
1
- # Basic whitelist/blacklist mechanism for domains and e-mail addresses
2
- # add a single domain or e-mail per line
3
- # default behavior for entries is to DENY or blacklist
4
- # reverse behavior by prepending an exclamation point !
5
- # foo.com <-- denied
6
- # !foo.com <-- allowed
7
- #
8
- # More complex/granular behaviors are possible, e.g.
9
- # To block everything claiming to be from aol.com, but still allow a single aol address:
10
- # aol.com
11
- # !friend@aol.com
12
- #
13
- # See full docs for details: http://haraka.github.io/plugins/access
@@ -1,2 +0,0 @@
1
- executable
2
- partial
@@ -1 +0,0 @@
1
- \.(?:ade|adp|bat|chm|cmd|com|cpl|dll|exe|hta|ins|isp|jar|js|jse|lib|lnk|mde|msc|msp|mst|pif|scr|sct|shb|sys|vb|vbe|vbs|vxd|wsc|wsf|wsh)$
package/config/avg.ini DELETED
@@ -1,5 +0,0 @@
1
- ;host=
2
- ;port=54322
3
- ;tmpdir=/tmp
4
- ;connect_timeout=10
5
- ;session_timeout=30
package/config/bounce.ini DELETED
@@ -1,15 +0,0 @@
1
- ; config/bounce_bad_rcpt: addresses that should never get bounces
2
-
3
-
4
- [check]
5
- single_recipient=true
6
- empty_return_path=true
7
- bad_rcpt=true
8
-
9
- ; reject all bounce messages (generally a bad idea)
10
- reject_all=false
11
-
12
-
13
- [reject]
14
- single_recipient=true
15
- empty_return_path=true
@@ -1,61 +0,0 @@
1
- ; configuration for data.headers plugin
2
-
3
- ; Requiring a date header will cause the loss of valid mail. The JavaMail
4
- ; sender used by some banks, photo processing services, health insurance
5
- ; companies, bounce senders, and others send messages without a Date header.
6
- ;
7
- ; If you can afford to reject some valid mail, please do enforce this, and
8
- ; encourage mailers toward RFC adherence. Otherwise, do not require Date.
9
-
10
- ; Headers that MUST be present (RFC 5322)
11
- ; required=From,Date ; <-- RFC 5322 compliant
12
- required=From,Date
13
-
14
- ; Received
15
- ; If you have no outbound, add 'Received' to the required list for an
16
- ; aggressive anti-spam measure. It works because all real mail relays will
17
- ; add a `Received` header. It may false positive on some bulk mail that
18
- ; uses a custom tool to send, but this appears to be fairly rare.
19
-
20
- ; If the date header is present, and future and/or past days are
21
- ; defined, it will be validated. 0 = disabled
22
- date_future_days=2
23
- date_past_days=15
24
-
25
-
26
- ; Headers that MUST be unique if present (RFC 5322)
27
- ; singular=Date,From,Sender,Reply-To,To,Cc,Bcc,Message-Id,In-Reply-To,References,Subject (RFC 5322)
28
- singular=Date,From,Sender,Reply-To,To,Cc,Bcc,Message-Id,In-Reply-To,References,Subject
29
-
30
- ; enable/disable the various header checks
31
- [check]
32
- ; duplicate_singular=true
33
- ; missing_required=true
34
- ; invalid_return_path=true
35
- ; invalid_date=true
36
- ; user_agent=true
37
- ; direct_to_mx=true
38
- ; from_match=true
39
- ; mailing_list=true
40
- ; delivered_to=true
41
-
42
-
43
- [reject]
44
- ; reject switches for each header check
45
- ; default are shown. Rejecting based on any of these
46
- ; criteria will result in the loss of valid mail.
47
- ;
48
- ; duplicate_singular=false
49
- ; missing_required=false
50
- ; invalid_return_path=false
51
- ; invalid_date=false
52
-
53
- ; arriving messages should not have Delivered-To set to the RCPT TO address.
54
- ; delivered_to=true
55
-
56
- ; these 4 do not have reject support, and likely shouldn't.
57
- ; user_agent=false
58
- ; direct_to_mx=false
59
- ; from_match=false
60
- ; mailing_list=false
61
-
@@ -1,78 +0,0 @@
1
- #!/bin/sh
2
-
3
- DOMAIN="$1"
4
- SMTPD="$2"
5
-
6
- usage()
7
- {
8
- echo " usage: ${0} <example.com> [haraka username]" 2>&1
9
- echo 2>&1
10
- exit 1
11
- }
12
-
13
- if [ -z "$DOMAIN" ]; then
14
- usage
15
- fi
16
-
17
- if [ -z "$SMTPD" ]; then
18
- SMTPD="www"
19
- fi
20
-
21
- # Create a directory for each DKIM signing domain
22
- mkdir -p "$DOMAIN"
23
- cd "$DOMAIN" || exit
24
-
25
- # The selector can be any value that is a valid DNS label
26
- # Create in the common format: mmmYYYY (apr2014)
27
- date '+%h%Y' | tr '[:upper:]' '[:lower:]' > selector
28
-
29
- # Generate private and public keys
30
- # - Key length considerations -
31
- # The minimum recommended key length for short duration keys (ones that
32
- # will be replaced within a few months) is 1024. If you are unlikely to
33
- # rotate your keys frequently, choose 2048, at the expense of more CPU.
34
- openssl genrsa -out private 2048
35
- chmod 0400 private
36
- openssl rsa -in private -out public -pubout
37
-
38
- DNS_NAME="$(tr -d '\n' < selector)._domainkey"
39
- DNS_ADDRESS="v=DKIM1;p=$(grep -v '^-' public | tr -d '\n')"
40
-
41
- # Fold width is arbitrary, any value between 80 and 255 is reasonable
42
- BIND_SPLIT_ADDRESS="$(echo "$DNS_ADDRESS" | fold -w 110 | sed -e 's/^/ "/g; s/$/"/g')"
43
-
44
- # Make it really easy to publish the public key in DNS
45
- # by creating a file named 'dns', with instructions
46
- cat > dns <<EO_DKIM_DNS
47
-
48
- Add this TXT record to the ${DOMAIN} DNS zone.
49
-
50
- ${DNS_NAME} IN TXT ${DNS_ADDRESS}
51
-
52
-
53
- BIND zone file formatted:
54
-
55
- ${DNS_NAME} IN TXT (
56
- ${BIND_SPLIT_ADDRESS}
57
- )
58
-
59
- Tell the world that the ONLY mail servers that send mail from this domain are DKIM signed and/or bear our MX and A records.
60
-
61
- With SPF:
62
-
63
- SPF "v=spf1 mx a -all"
64
- TXT "v=spf1 mx a -all"
65
-
66
- With DMARC:
67
-
68
- _dmarc TXT "v=DMARC1; p=reject; adkim=s; aspf=r; rua=mailto:dmarc-feedback@${DOMAIN}; ruf=mailto:dmarc-feedback@${DOMAIN}; pct=100"
69
-
70
- For more information about DKIM and SPF policy,
71
- the documentation within each plugin contains a longer discussion and links to more detailed information:
72
-
73
- haraka -h dkim_sign
74
- haraka -h spf
75
-
76
- EO_DKIM_DNS
77
-
78
- cd ..
@@ -1,4 +0,0 @@
1
- disabled = true
2
- selector = mail
3
- domain = example.com
4
- headers_to_sign = From, Sender, Reply-To, Subject, Date, Message-ID, To, Cc, MIME-Version
@@ -1,7 +0,0 @@
1
-
2
- ; Recommended (but not default) values presented below.
3
-
4
- ; in secs
5
- ;allowed_time_skew = 60
6
- ;
7
- ;sigerror_log_level = info
package/config/dnsbl.ini DELETED
@@ -1,23 +0,0 @@
1
-
2
- ; reject: (default: true)
3
- ; denies connections from IPs on any active DNSBL
4
- reject=true
5
-
6
- ; periodically check each DNSBL, disabling ones that fail checks
7
- periodic_checks = 30
8
-
9
- ; search: Default (first)
10
- ; first: consider first DNSBL response conclusive. End processing.
11
- ; all: process all DNSBL results
12
- search=first
13
-
14
- ; enable_stats (Default: false)
15
- ; stores stats in a Redis DB (see plugins/dns_list_base)
16
- ;enable_stats=true
17
-
18
- ; stats_redis_host (Default: localhost)
19
-
20
-
21
- ; zones: a comma separated list of DNSBL zones
22
- ; or list DNSBL zones in config/dnsbl.zones
23
- zones=zen.spamhaus.org
@@ -1,43 +0,0 @@
1
- ; Config for greylisting plugin
2
-
3
- ; greylisting action text
4
- text = Greylisted. Please come back later.
5
-
6
- [redis]
7
- host = 127.0.0.1
8
- ; port = 6379
9
- db = 11
10
-
11
- [skip]
12
- ; skip for DNSWL hosts having high reputation
13
- dnswlorg = true
14
- mailspikewl = true
15
-
16
- [period]
17
- # transition path: first_connect --> black (defer) --> grey(allow) --> white (allow) --> expired
18
-
19
- # 14 minutes
20
- black = 850
21
- # 25 hours
22
- grey = 90000
23
- # 35 days
24
- white = 3024000
25
-
26
- [envelope_whitelist]
27
- # Envelope emails or domains, one per line
28
-
29
-
30
- [ip_whitelist]
31
- # IP or Subnet, one per line
32
-
33
-
34
- [recipient_whitelist]
35
- # Recipient emails or domains, one per line
36
-
37
-
38
- [special_dynamic_domains]
39
- # Put domains that should be always treated as dynamic here.
40
- # Pattern is matched at the end of rdns
41
-
42
- # SiteGround VPS service
43
- sgvps.net
@@ -1,52 +0,0 @@
1
- ; disable checks or reject for each test if you are worried about strictness
2
-
3
- ;dns_timeout=28
4
-
5
- [check]
6
- ; match_re=true
7
- ; bare_ip=true
8
- ; dynamic=true
9
- ; big_company=true
10
- ; literal_mismatch: 1 = exact IP match, 2 = IP/24 match, 3 = /24 or RFC1918
11
- ; literal_mismatch=2
12
- ; valid_hostname=true
13
- ; forward_dns=true
14
- ; rdns_match=true
15
- ; host_mismatch: hostname differs between EHLO invocations
16
- ; host_mismatch=true
17
- ; proto_mismatch: host sent EHLO but then tries to sent HELO or vice-versa
18
- ; proto_mismatch=true
19
-
20
- [reject]
21
- ; host_mismatch=true
22
- ; proto_mismatch=false
23
- ; rdns_match=false
24
- ; dynamic=false
25
- ; bare_ip=false
26
- ; literal_mismatch=false
27
- ; valid_hostname=false
28
- ; forward_dns=false
29
- ; big_company=true
30
-
31
- [skip]
32
- ; private_ip=true
33
- ; relaying=true
34
- ; whitelist=true ; TODO
35
-
36
- [bigco]
37
- msn.com=msn.com
38
- hotmail.com=hotmail.com
39
- yahoo.com=yahoo.com,yahoo.co.jp
40
- yahoo.co.jp=yahoo.com,yahoo.co.jp
41
- yahoo.co.uk=yahoo.co.uk
42
- excite.com=excite.com,excitenetwork.com
43
- mailexcite.com=excite.com,excitenetwork.com
44
- yahoo.co.jp=yahoo.com,yahoo.co.jp
45
- mailexcite.com=excite.com,excitenetwork.com
46
- aol.com=aol.com
47
- compuserve.com=compuserve.com,adelphia.net
48
- nortelnetworks.com=nortelnetworks.com,nortel.com
49
- earthlink.net=earthlink.net
50
- earthling.net=earthling.net
51
- google.com=google.com
52
- gmail.com=google.com,gmail.com
@@ -1,18 +0,0 @@
1
- ;port=9001
2
- ;tmpdir=/tmp
3
- ;gbudb_report_deny=true
4
- ;tag_string=[SPAM]
5
-
6
- ;[gbudb]
7
- ;white=accept
8
- ;caution=allow
9
- ;black=allow
10
- ;truncate=reject
11
-
12
- ;[message]
13
- ;white=allow
14
- ;local_white=accept
15
- ;caution=allow
16
- ;black=allow
17
- ;truncate=reject
18
- ;nonzero=reject
@@ -1,56 +0,0 @@
1
- ; How does Haraka connect to the SpamAssassin spamd daemon?
2
- ; TCP/IP: 127.0.0.1:783
3
- ; socket: /var/run/spamd/spamd.sock
4
- spamd_socket=127.0.0.1:783
5
-
6
- ; the username we tell spamd the message is to (default: default)
7
- ;spamd_user=first-recipient (see docs)
8
- ;spamd_user=
9
-
10
- ; messages larger than this are not scored by SA
11
- max_size=500000
12
-
13
- ; Munge the subject of messages with a score higher than..
14
- ; munge_subject_threshold=5
15
- subject_prefix=*** SPAM ***
16
-
17
- ; what to do with incoming messages with X-Spam-* headers
18
- ; options are: rename, drop, keep
19
- old_headers_action=rename
20
-
21
- ; use the SpamAssassin 3.0+ syntax in X-Spam-Status header
22
- ; modern: No, score=0.8 required=8.0 tests=...
23
- ; legacy: No, hits=0.8 required=8.0 tests=...
24
- modern_status_syntax=1
25
-
26
- ; Reject all messages with more than this many hits
27
- ; reject_threshold=10
28
-
29
- ; when a connection has relay privileges, the rejection limit
30
- ; relay_reject_threshold=7
31
-
32
- ; How long should we wait for SpamAssassin to answer the socket
33
- ; in seconds (default: 30)
34
- ;connect_timeout=
35
-
36
- ; How long should we wait for a result from SpamAssassin
37
- ; in seconds (default: 300)
38
- ;results_timeout=
39
-
40
- ; Merge SpamAssassin's headers into the message
41
- ;add_headers=true
42
-
43
- ; the header that is sent to spamc
44
- ;spamc_auth_header = X-Haraka-Relay
45
-
46
- [check]
47
- ;authenticated=true
48
- ;private_ip=true
49
- ;local_ip=true
50
- ;relay=true
51
-
52
- [defer]
53
- ; Set to true to return DENYSOFT on errors, connection timeouts, or scanning timeouts
54
- ;error=false
55
- ;connect_timeout=false
56
- ;scan_timeout=false