Commit Graph
22 Commits
Author SHA1 Message Date
Wez Furlong 28f0786e42 dkim: update crate deps 2023-06-15 11:37:59 -07:00
Wez Furlong eb44e0780e Use vendored in dkim fork 2023-06-15 09:11:34 -07:00
Wez Furlong 8ff2ea950f dkim: update to pick up some perf improvements from my fork 2023-06-14 15:39:24 -07:00
Wez Furlong bcfba07dad dkim: switch to my fork of cfdkim for RSA signatures
That fork removes the lifetime from the Signer type which makes
it easier to cache more efficiently.
2023-06-09 06:46:05 -07:00
Wez Furlong 88fd825be4 dkim: add cfdkim as a runtime alternative RSA signer
The mail-auth crate doesn't support 1024 bit RSA keys, which are
currently the dominant size of key used by senders at scale.

It is not possible to even configure a 2048 bit RSA key in some DNS
providers, which blocks widespread adoption of larger key sizes.

This commit pulls in the cfdkim crate as an alternative implementation.

I'm not happy with this implementation because the API of the crate
defeats some caching optimizations, doesn't support certain signing
attributes that are supported by mail-auth and the generated header isn't
nicely wrapped.

We'll likely "do something" to resolve this in a future commit.

For now, this implementation is enabled by setting `use_cf = true`
in the signing parameters.
2023-06-08 14:29:19 -07:00
Wez Furlong 15e886646c fix compilation of individual crates 2023-04-18 16:31:52 -07:00
Wez Furlong 07b75dd117 remove oldtime feature from chrono crate
it pulls in an old version of the time crate that flags many
rust projects as being vulnerable to an old CVE.

We still have other references to time that I'll remove in a follow up.
2023-04-18 15:02:59 -07:00
Wez Furlong b3f3f877df add functions for working with address headers 2023-03-14 18:53:47 -07:00
Wez Furlong ec920535e3 refactor: move arf and bounce report parsing to kumo-log-types
This reduces transitive deps for other crates that want ostensibly just
the type definitions.
2023-03-12 20:16:05 -07:00
Wez Furlong c184214253 allow loading TLS key+cert from hashicorp vault
refactor to allow reusing the same key loader logic for dkim, smtp
and http.
2023-03-04 11:01:35 -07:00
Wez Furlong 6204642270 add trace headers configuration and link to ARF parsing 2023-03-04 07:22:02 -07:00
Wez Furlong 7d76b3d9d7 add support for retrieving signing keys from hashicorp vault 2023-03-03 10:32:16 -07:00
Wez Furlong 39e08d602b add scheduling restriction datatype
This will be used in the future to adjust the message
sending schedule on a per-message basis.
2023-03-01 09:43:48 -07:00
Wez Furlong 6dfb44012e add some header manipulation functions 2023-02-26 15:01:05 -07:00
Wez Furlong b25ff76118 add dkim signing
A fairly sprawling commit:

* Move config to its own crate to facilitate making things more modular
* Crates/modules can now provide a registration function that can be
  used to setup functions in the lua environment
* Message crate now has a dkim module with a signer type that can
  be loaded from lua; signers are cached (with ttl) and shareable
* Message now has a dkim_sign method that does the signing, as well
  as methods for appending and prepending headers that are necessary
  to support signing.
2023-02-21 21:18:49 -07:00
Wez Furlong c049277d61 parallelize writing spool and metadata when saving the message 2023-02-20 18:21:24 -07:00
Wez Furlong f8fc4582fc add counters for messages in different states 2023-02-19 15:39:51 -07:00
Wez Furlong 54e230ffca message expiration
* Switch uuids to v1 format, so that we can cheaply determine
  when a message was created without having to load its metadata
  from the spool
* Add some message delivery parameters; retry interval, limit, max age
* Respect those parameters when spooling in and when we encounter
  a transient failure.
2023-02-18 14:39:54 -07:00
Wez Furlong d889acc275 replace mail-send with our own client implementation
This removes a dep on an AGPL crate
2023-02-17 11:08:59 -07:00
Wez Furlong 5a8bc19a1c prep for adding a Queue type 2023-02-13 09:38:10 -07:00
Wez Furlong 79816d9479 adjust policy event to take bifurcated messages rather than state 2023-02-12 15:13:09 -07:00
Wez Furlong aeb49003ad start building out the Message type 2023-02-12 14:43:10 -07:00