Commit Graph
1506 Commits
Author SHA1 Message Date
Wez Furlong 10bade362b docs: add version info to rewrite and regex set map 2023-11-01 13:41:34 -07:00
Wez Furlong 343411c3d2 Add event for rewriting a failed smtp response
This will only trigger for messages where we've gotten to MAIL FROM or
later, and where we got a non-250 response.

The event is passed the response + the domain, tenant, campaign and
routing domain.  It can return an alternative response code value
or `null` to indicate no change.
2023-11-01 13:25:15 -07:00
Wez Furlong 8942ef7f86 Add regex_set_map type
This is useful for efficiently matching a string simultaneously against
multiple regular expressions.

The motivating use case is to use it together with the
smtp_client_rewrite_delivery_status event.
2023-11-01 12:52:39 -07:00
Wez Furlong 2b0ef4820f move libunbound to its own repo
You can now find it over at https://github.com/KumoCorp/libunbound-rs
2023-10-30 11:19:17 -07:00
Wez Furlong e731d47c3e rocksdb: trim down the number of retained LOG files
The default is 1000 which is really high. This sets it to 10,
and configures rotation of those daily, so that there should be
no more than 10 days worth of LOG files.
2023-10-27 08:38:06 -07:00
Wez Furlong 8cbc60410d docs: update for dane 2023-10-26 17:03:00 -07:00
Wez Furlong 903189d873 add tls info to Delivery log records
refs: https://github.com/KumoCorp/kumomta/issues/39
refs: https://github.com/KumoCorp/kumomta/issues/8
2023-10-26 17:03:00 -07:00
Wez Furlong 9c951a444d kumod: Add enable_dane option
Adds the ability to enable DANE verification for SMTP.

It is disabled by default because correct operation also
requires working DNSSEC which in turns requires the use
of the unbound resolver.

When enabled, the SMTP client will use the OpenSSL DANE
implementation to verify the peer certificate.

refs: https://github.com/KumoCorp/kumomta/issues/8

```lua
local kumo = require 'kumo'

-- Called on startup to initialize the system
kumo.on('init', function()
  kumo.configure_accounting_db_path '/tmp/acct.db'

  kumo.dns.configure_unbound_resolver {
    options = {
      validate = true, -- enable DNSSEC validation
    },
    -- name_servers = { '1.1.1.1:53' },
  }

  kumo.set_diagnostic_log_filter 'rfc5321=trace,kumod::ready_queue=trace,kumod::smtp_dispatcher=trace,info'
  kumo.start_esmtp_listener {
    listen = '0.0.0.0:2025',
    relay_hosts = { '127.0.0.1', '192.168.1.0/24' },
  }

  kumo.configure_local_logs {
    log_dir = '/var/tmp/kumo-logs',
    max_segment_duration = '1s',
  }

  kumo.start_http_listener {
    listen = '0.0.0.0:8000',
    trusted_hosts = { '127.0.0.1', '::1' },
  }

  kumo.define_spool {
    name = 'data',
    path = '/var/tmp/kumo-spool/data',
    kind = 'RocksDB',
  }

  kumo.define_spool {
    name = 'meta',
    path = '/var/tmp/kumo-spool/meta',
    kind = 'RocksDB',
  }
end)

kumo.on('get_egress_pool', function(pool_name)
  if pool_name == 'pool0' then
    return kumo.make_egress_pool {
      name = 'pool0',
      entries = {
        { name = 'source0' },
      },
    }
  end

  error("I don't know how to configure pool " .. pool_name)
end)

kumo.on('get_egress_source', function(source_name)
  return kumo.make_egress_source {
    name = source_name,
    socks5_proxy_server = '127.0.0.1:5000',
    socks5_proxy_source_address = '0.0.0.0',
  }
end)

kumo.on(
  'get_egress_path_config',
  function(routing_domain, egress_source, site_name)
    print('get_egress_path_config', routing_domain, egress_source, site_name)
    return kumo.make_egress_path {
      enable_tls = 'Disabled',
      enable_dane = true,
      idle_timeout = '5s',
      data_timeout = '10s',
      data_dot_timeout = '15s',
      prohibited_hosts = {},
    }
  end
)

kumo.on('get_queue_config', function(domain, tenant, campaign)
  return kumo.make_queue_config {
    egress_pool = 'pool0',
  }
end)
```
2023-10-26 17:03:00 -07:00
Wez Furlong f3241dc3c7 docs: fix typo 2023-10-26 17:03:00 -07:00
Wez Furlong 0b3c258c28 rfc5321 client: add potential to use openssl for starttls
This code isn't currently reachable (defaults to false), but allows
for a runtime selection between rustls and openssl-based tls.

refs: https://github.com/KumoCorp/kumomta/issues/8
2023-10-26 17:03:00 -07:00
Wez Furlong 8936f001e9 openssl: point to our fork of the rust bindings
This will enable DANE support via openssl in a future commit
2023-10-26 17:03:00 -07:00
Wez Furlong 30731e480c unbreak integration tests
These were broken by 898e08aece
2023-10-26 17:02:30 -07:00
Mike Hillyer ff0869c162 Update TSA page in User Guide to show the use of extra_files 2023-10-26 11:22:16 -04:00
Mike Hillyer 898e08aece Update shaping.toml with feedback provided by mail.com 2023-10-26 08:35:42 -04:00
Wez Furlong fb2cdff808 docs: refine from-source info
Minimize the rust install section to just what is necessary.
Show where the rpms and debs get built, and how to install them.
2023-10-24 13:19:03 -07:00
Wez Furlong f8aaa6f133 cargo update 2023-10-24 11:23:14 -07:00
Wez Furlong 8efd4d5127 docs: clarify install-from-source docs
Avoid referencing implementation details that we may change
(install.sh).

Document what goes where with a bit of explanation.

Remove examples that show launching `kumod &` as we do not recommend
running the service in the background without some kind of supervision
(such as systemd).  Instead, show how how to run the process and leave
it to the reader to decide how they with to deploy it in their
environment.

closes: https://github.com/KumoCorp/kumomta/issues/72
2023-10-24 11:22:00 -07:00
Wez Furlong bec4bc1445 generate-toc.py: format 2023-10-24 11:19:55 -07:00
Tom Mairs 0b36fe4788 Add background/foreground instruction 2023-10-24 00:08:17 +00:00
Tom Mairs 201dee47ac Add instructions to run from sbin 2023-10-24 00:05:36 +00:00
Tom Mairs 7e57b009c1 Fix for console type 2023-10-23 23:45:44 +00:00
Tom Mairs adf3acb9b7 Fix doc highlight type 2023-10-23 23:20:23 +00:00
Tom Mairs 065120c19a add install.sh back in 2023-10-23 23:10:55 +00:00
Tom Mairs bac319829c update with sudo 2023-10-23 17:14:26 +00:00
Mike Hillyer d9dd7ddea7 Change console example to match lua example. 2023-10-20 10:00:59 -04:00
Mike Hillyer 72d93f212d Update troubleshooting page based on Wez's feedback. 2023-10-20 09:34:42 -04:00
Mike Hillyer c8dd0e3f93 Fix path of link to troubleshooting page. 2023-10-19 22:45:47 -04:00
Mike Hillyer a8ae27fffb Add crossreference to troubleshooting page to the starting KumoMTA page. 2023-10-19 22:36:55 -04:00
Mike Hillyer 13fb1b5f0c Typo 2023-10-19 22:33:51 -04:00
Mike Hillyer d433bea3f1 Add troubleshooting page, add cross-reference from Tutorial, remove orphaned integration pages from Tutorial directory. 2023-10-19 22:22:33 -04:00
Mike Hillyer 141beb60f6 Link fix. 2023-10-18 23:16:12 -04:00
Tom Mairs 5909da616a update TOS 2023-10-18 22:29:33 +00:00
Tom Mairs 2e453b8714 fix typo in yaml file 2023-10-18 22:26:38 +00:00
Tom Mairs cf5e815c6b fix metrics targets 2023-10-18 22:20:01 +00:00
Tom Mairs f93f6d7f30 Add files via upload 2023-10-18 16:18:56 -06:00
Tom Mairs bdb43f1e53 add Prometheus integration first draft 2023-10-18 17:15:21 +00:00
Wez Furlong 39a046e07c docs: add missing routing_domain param to get_queue_config event examples 2023-10-18 06:56:01 -07:00
Wez Furlong 44b14f4087 docs: format generate-toc.py 2023-10-18 06:32:11 -07:00
Tom Mairs 9a4fc06726 fix numbering again 2023-10-17 19:45:26 +00:00
Tom Mairs b1b2ae0c4a fix numbering 2023-10-17 19:37:19 +00:00
Tom Mairs d2614fd274 Update TOC 2023-10-17 19:27:41 +00:00
Tom Mairs 3bb6e97d0d Add Integrations section and Ongage Instructions 2023-10-17 19:21:39 +00:00
Tom Mairs 876496f997 Add files via upload 2023-10-17 13:20:28 -06:00
Tom Mairs 748752ae18 Add Ongage sample 2023-10-17 17:59:34 +00:00
Tom Mairs 2ead4427c0 Add files via upload 2023-10-17 11:11:36 -06:00
Wez Furlong 32f8060ecc docs: logging: flush after 10s, clarify in quickstart and tutorial
New users trip over the very conservative defaults on log flushing,
so let's make the `init.lua` that we populate for new installs
set the duration to 10 seconds by default, and adjust the language
in the docs to match that.

Clarify the logging documentation about how the logs are
chunked/flushed.
2023-10-12 21:27:39 -04:00
Wez Furlong 3e2d49b80b rfc5321: allow address literals with HELO
This isn't strictly conforming behavior, but we've had reports
from users that some tooling and MTAs both generate and accept
this; since it is trivial to support, let's do it.
2023-10-12 20:46:38 -04:00
Wez Furlong 4c36489681 First pass at accounting db
This keeps track of the volume of receptions and deliveries over time.
2023-10-12 20:43:58 -04:00
Wez Furlong 2c99834a6e unbound: fix compilation on macos
avoid duplicate isblank
2023-10-09 11:13:07 -07:00
Wez Furlong 37e3401584 proxy: now compiles on macos 2023-10-09 10:04:24 -07:00