Commit Graph

112 Commits

Author SHA1 Message Date
Wez Furlong d60c961479 increase lua pool limits, allow configuring it 2023-06-16 10:03:49 -07:00
Wez Furlong a2feac004f actually add ehlo_domain to make_egress_source
Enable that field and add it to the fallback used by the
smtp_dispatcher.  The ehlo_domain configured for the pathway
takes precedence, then we'll take the value from the source,
then fallback to the local hostname.

refs: https://github.com/KumoCorp/kumomta/issues/59
2023-06-16 08:43:54 -07:00
Wez Furlong 2992e42138 add received_from and received_via meta values
We don't set received_via for http because axum/hyper make it a
bit weird to access that information and it will require some
effort to figure out how to get that without breaking the
existing proxy-aware client IP determination.
2023-06-13 15:18:06 -07:00
Wez Furlong e8a049cc83 document listener parameter to get_listener_domain update helpers
Allow per-listener listener-domain configuration
2023-05-31 15:46:12 -07:00
Wez Furlong ce7dece927 move domains out of listener, replace with get_listener_domain event
This commit also includes a policy helper
`policy_extras.listener_domains` to make it convenient to define
listener domains in toml and/or json files.

To facilitate this, the DomainMap rust structure has been exposed
to lua code via the new `kumo.domain_map.new` function.
2023-05-31 12:29:44 -07:00
Wez Furlong b7c557c31a define_egress_(pool|source) -> make_egress_(pool|source)
Switch the configuration plumbing for pools and sources to be pull-based
rather than push based.

In other words, rather than defining them in the `init` event,
you now need to supply them to the new `get_egress_pool` and
`get_egress_source` events.

Data is cached by default for 1 minute. This allows for new sources
to come into being on-demand, and for data to age out and change
over time, without requiring that the server be restarted.

This commit updates the reference section, but there is some content
in the user guide that refers to the old style of configuration that
will need to be updated.

refs: https://github.com/KumoCorp/kumomta/issues/13
2023-05-30 14:08:07 -07:00
Wez Furlong 9b1d82275c add spool_message_enumerated event
closes: #42
2023-05-30 10:14:37 -07:00
Mike Hillyer 0eefbccd5d Typo fix. 2023-05-18 16:44:32 -04:00
Mike Hillyer 0d85aea133 Adding SMTP AUTH to the user guide. 2023-05-17 17:39:23 -04:00
Wez Furlong 9d3411431f Add outbound SMTP auth support
refs: https://github.com/KumoCorp/kumomta/issues/10
2023-05-15 17:38:17 -07:00
Wez Furlong db0c042cef Add amqp client
refs: https://github.com/KumoCorp/kumomta/issues/31
2023-05-15 17:24:15 -07:00
Mike Hillyer 3e3483b281 Automated doc formatting fix 2023-05-10 17:44:47 +00:00
Mike Hillyer 88390291b3 Adding Webhook section to the configuration chapter. 2023-05-10 13:42:38 -04:00
Wez Furlong 6fdee41600 Add HA Proxy support
I used a config like this for testing:

```
global
    log stdout  format raw  local0  debug

defaults
    timeout connect 10s
    timeout client 30s
    timeout server 30s
    log global

listen outboundsmtp
    log global
    bind 0:2526 accept-proxy
    mode tcp
    use-server v4 if { src 0.0.0.0/0 }
    use-server v6 if { src ::/0 }
    server v4 0.0.0.0 source 0.0.0.0 usesrc clientip
    server v6 ::: source ::: usesrc clientip
```

Launched via:

```console
$ sudo haproxy -f assets/haproxy.conf -V
```

with the source:

```lua
  kumo.define_egress_source {
    name = 'w00t',
    ha_proxy_server = '127.0.0.1:2526',
    ha_proxy_source_address = '192.168.1.92',
  }
```

refs: #19
2023-05-10 09:50:06 -07:00
Wez Furlong 14291df014 docs: fix missing note admonish 2023-05-09 11:06:01 -07:00
Wez Furlong 927721fc0c Add toml parsing/encoding functions to lua
refs: https://github.com/KumoCorp/kumomta/issues/43
2023-05-09 08:40:37 -07:00
Wez Furlong 757ddbcf22 Automated doc formatting fix 2023-05-09 15:28:01 +00:00
Wez Furlong 992cae1409 Allow loading a key source directly from lua
This makes it easier to compose secret management with a variety
of lua functions without having to build that directly into each
of them.

In particular: one can now use vaults or other secret stores that
we add in the future to manage credentials for HTTP clients.
2023-05-09 08:25:54 -07:00
Wez Furlong f0e0ffe828 add message:set_force_sync
refs: https://github.com/KumoCorp/kumomta/issues/6
2023-05-08 17:37:54 -07:00
Wez Furlong c738ce2985 Automated doc formatting fix 2023-05-08 22:07:27 +00:00
Wez Furlong 0211b03060 http: add helpers for constructing form data
refs: https://github.com/KumoCorp/kumomta/issues/36
2023-05-08 15:06:09 -07:00
Wez Furlong cceaccf06a docs: webhook/lua delivery reference
refs: https://github.com/KumoCorp/kumomta/issues/36
refs: https://github.com/KumoCorp/kumomta/issues/18
2023-05-08 13:51:06 -07:00
Wez Furlong 65c7a9e5a6 Add reception and delivery protocol to log record
closes: https://github.com/KumoCorp/kumomta/issues/38
2023-05-08 08:39:40 -07:00
Wez Furlong c61d6aaa04 docs for kumo.http 2023-05-05 15:08:48 -07:00
Wez Furlong dade11ef22 dns: make it easy to detect and react to domain literals in lua
Add an is_domain_literal field to the resolve of kumo.dns.lookup_mx
2023-05-05 10:57:40 -07:00
Tom Mairs b435e210bb Add Note about CIDR strictness 2023-04-28 09:03:24 -07:00
Wez Furlong ef2abc7031 allow comments in json parsed by kumo.json_load, kumo.json_parse 2023-04-26 15:08:29 -07:00
Mike Hillyer 969d079eb6 Finish FBL and Bounce chapters, add chapter on Sending IPs. 2023-04-24 10:17:51 -04:00
Mike Hillyer e2be05804a Build out FBL and Domain Config chapters, tweak SMTP Listener content. 2023-04-22 12:09:44 -04:00
Wez Furlong 385788765e rename delayed_count -> scheduled_count in metrics 2023-04-12 12:07:58 -07:00
Mike Hillyer 4197978134 Update reference manual to use new Scheduled Queue terminology. 2023-04-11 13:36:32 -04:00
Mike Hillyer 2e2a283692 Update bounce file name in TOC 2023-04-08 13:56:56 -04:00
Mike Hillyer d619a8eb63 Introduce bounce & fbl chapter, initial fill of bounce section. 2023-04-08 13:56:56 -04:00
Mike Hillyer 475e28fbb5 Update logging documentation. 2023-04-07 21:30:40 -04:00
Wez Furlong 9225644ce7 export ready queue size
```
  "ready_count": {
    "help": "number of messages in the ready queue",
    "type": "gauge",
    "value": {
      "service": {
        "smtp_client:source1->loopback.dummy-mx.example.com": 46.0,
        "smtp_client:source2->loopback.dummy-mx.example.com": 152.0,
      }
    }
  },
```

closes: #30
2023-04-03 10:14:16 -07:00
Wez Furlong 01f125d8ad docs: show how queue name varies based on meta values 2023-03-27 18:10:01 -07:00
Wez Furlong e87a5b18bb Improve performance of finding CRLF.CRLF for large messages by 20x
Using a better tuned algorithm for finding a substring match removes
a CPU bottleneck and improves message throughput by 20x at 100Kb
message sizes.
2023-03-27 09:39:51 -07:00
Wez Furlong ece1b89b00 add admin HTTP API for changing the log level 2023-03-24 10:04:00 -07:00
Wez Furlong 6740a68fad add kumo.set_diagnostic_log_filter for adjusting log levels via config 2023-03-24 09:02:10 -07:00
Wez Furlong 3a26c60438 also export counters as json
expand the docs to show what the data looks like
2023-03-23 10:47:17 -07:00
Wez Furlong cf1ba5f0b2 add key_data source for key data, refactor docs
Break out the KeySource object into its own reference page to
avoid manually duplicating the same information into multiple pages.

Explain how to use data fetched from eg: sqlite.
2023-03-23 08:27:14 -07:00
Wez Furlong 36de652dd2 docs: fix indent 2023-03-22 17:05:03 -07:00
Wez Furlong 0167041ed0 add kumo.memoize as a way to add caching to any lua function 2023-03-22 17:01:07 -07:00
Wez Furlong f9c6eb8ce3 add ed25519 dkim signer 2023-03-16 10:23:54 -07:00
Wez Furlong 09a251d5a1 docs: adjust queue example to show composing domain and source params 2023-03-15 10:13:56 -07:00
Wez Furlong b43e88985c add kumo.dns.lookup_mx
This function returns MX information, including the computed site_name.
Update the queue example to show how to use it to populate the SITE_OF
map used in that example.

This commit switches to using the `Name` type under the covers to ensure
that we use canonical names for our cache keys.
2023-03-15 09:34:23 -07:00
Wez Furlong be0fd76d0b add ehlo_domain config option 2023-03-14 22:26:07 -07:00
Wez Furlong e1f0939d81 add json functions 2023-03-14 20:07:40 -07:00
Wez Furlong 384da92c0e docs: update dkim signing to use header from 2023-03-14 18:53:47 -07:00
Wez Furlong b3f3f877df add functions for working with address headers 2023-03-14 18:53:47 -07:00