Commit Graph
865 Commits
Author SHA1 Message Date
Wez Furlong bb20a9b005 resolve !Send async call issue with lua
This commit does a bit of a dance to setup a thread pool that
runs a LocalSet that allows !Send futures, such as those generated
by mlua's async support, to be spawned.
2023-02-15 16:17:49 -07:00
Wez Furlong ab8fea32e9 allow rejecting incoming messages 2023-02-15 14:03:46 -07:00
Wez Furlong 21b3b79184 define a queue meta field. This defines the queue name for a message
"null" is a special queue name: assigning messages to null causes them
to not be stored to spool and silently discarded.
2023-02-15 11:03:40 -07:00
Wez Furlong 7775f88ab9 CI: cache stylua install 2023-02-15 09:56:04 -07:00
Wez Furlong ef6b192ac2 CI: use nightly toolchain for formatting purposes 2023-02-15 09:50:11 -07:00
Wez Furlong b59cc8e0ef CI: install rustfmt 2023-02-15 09:48:01 -07:00
Wez Furlong dd735ddbff CI: add code formatting checks 2023-02-15 09:46:22 -07:00
Wez Furlong b346c0515f Add CI 2023-02-15 09:40:05 -07:00
Wez Furlong a70ac90be5 promote delayed messages to ready queue when ready
and idle out and remove empty queues and dest sites.
2023-02-15 07:39:28 -07:00
Wez Furlong 79afc79794 add lua code formatting 2023-02-15 06:51:59 -07:00
Wez Furlong 52044f578c reject connections until spool is ready. smtp hostname configurable 2023-02-15 06:45:33 -07:00
Wez Furlong 82f9ace9d1 connect spool 2023-02-14 18:33:32 -07:00
Wez Furlong e388a2cc4f refine smtp sink targets 2023-02-14 17:13:32 -07:00
Wez Furlong 5422a5fa76 can now deliver mail 2023-02-14 16:11:24 -07:00
Wez Furlong 52b3351763 add ready queue to dest_site
Also add in a calculation for ideal number of connections
2023-02-13 20:58:52 -07:00
Wez Furlong 800bcd7217 connect esmtp server to queue
We can now queue messages to per-domain queues.
The per-domain queues feed into a destination site keyed
by distinct set of MX host names.

The destination site doesn't know what to do with messages yet.
2023-02-13 14:48:48 -07:00
Wez Furlong 48451694f7 plumbing for queueing
Need to add our own version of the wheel timer that uses Arc instead
of Rc in order to share it across threads.
2023-02-13 11:23:58 -07:00
Wez Furlong 5a8bc19a1c prep for adding a Queue type 2023-02-13 09:38:10 -07:00
Wez Furlong 25bde5ee18 allow configuring listeners from lua 2023-02-12 23:14:31 -07:00
Wez Furlong 3bddce299a fixup tests 2023-02-12 15:26:24 -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
Wez Furlong e4d4d7aeee add a spool implementation 2023-02-12 11:46:46 -07:00
Wez Furlong ffe9978d96 My panic fix got accepted upstream 2023-02-12 06:40:52 -07:00
Wez Furlong 6f5865e2b8 add timeq data structure 2023-02-11 23:07:48 -07:00
Wez Furlong ce502e8e35 add basic lua policy hooks 2023-02-11 18:59:55 -07:00
Wez Furlong 1b069223ab rename write_message -> write_response 2023-02-11 15:13:40 -07:00
Wez Furlong ead368cc7e flesh out the smtp protocol conversation
Can now receive envelope and data and then discard it all
2023-02-11 13:56:34 -07:00
Wez Furlong 3bd18718ec now we're a smtp-ish echo server 2023-02-11 12:19:31 -07:00
Wez Furlong 3287523d84 Skeleton tokio server for kumod 2023-02-10 16:44:10 -07:00
André Cruz d8ca9ec6ec Merge pull request #14 from cloudflare/dependabot/cargo/tokio-1.20.3
Bump tokio from 1.19.2 to 1.20.3
2023-01-10 11:56:50 +00:00
dependabot[bot] 659c0cc740 Bump tokio from 1.19.2 to 1.20.3
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.19.2 to 1.20.3.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.19.2...tokio-1.20.3)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-06 21:48:47 +00:00
André Cruz 5ba7131eb3 release 0.2.5 2022-10-12 17:29:02 +01:00
André Cruz e3068f3ad8 Merge pull request #13 from cloudflare/fix_header_selection
fix header selection
2022-10-12 17:20:37 +01:00
André Cruz 6125049946 reduce verbosity of build job 2022-10-12 17:20:13 +01:00
André Cruz 80ac5a6e71 setup github action to run tests 2022-10-12 17:17:11 +01:00
André Cruz 2d627b92c7 fix header selection
Header selection routing was not handling correctly duplicate
headers. This is valid, according to the spec, and the mail headers
should be chosen last to first.
2022-10-12 16:37:57 +01:00
André Cruz d9f388eb11 Release 0.2.4 2022-09-14 15:02:55 +01:00
André Cruz a3b3c5d0bd Merge pull request #12 from cloudflare/dns_case_insensitive
dns names compared in a case insensitive manner
2022-09-14 15:01:07 +01:00
André Cruz d6252e5c03 dns names compared in a case insensitive manner
When trying to find the correct signature to verify, compare the
From domain and the SDID in a case insensitive manner, since they
correspond to DNS names.
2022-09-14 12:09:09 +01:00
André Cruz 8361743761 release 0.2.3 2022-08-10 11:11:38 +01:00
André Cruz 552a63c30c Merge pull request #11 from cloudflare/improve_test
canonicalize also dkim header
2022-08-10 11:04:50 +01:00
André Cruz 7202bf78ca canonicalize also dkim header
Improve test and also apply canonicalization algorithm to dkim header.
2022-08-09 19:16:30 +01:00
André Cruz 5c5f0e1113 Release 0.2.2 2022-08-09 12:31:02 +01:00
André Cruz 6916d7f33e Merge pull request #9 from edevil/curve
implement support for ed25519
2022-08-09 11:59:41 +01:00
André Cruz b16c8a3720 release 0.2.1 2022-08-05 14:02:35 +01:00
André Cruz 44e3b1a1bd Merge pull request #10 from cloudflare/canoc_pass
return canoc types on success
2022-08-03 15:46:24 +01:00
André Cruz 989dcca937 return canoc types on success
Return the canocalization algorithms used when dkim is successful.
2022-08-01 18:32:20 +01:00
André Cruz b3938a4c16 implement support for ed25519
Add support for sign/verification of ed25519 signatures.
Add more tests lifted from the spec.
Fix simple header canonicalization.
2022-07-28 23:41:41 +01:00
André Cruz a9994e3df5 Merge pull request #8 from edevil/stop_transparency
don't apply SMTP transparency decoding
2022-07-21 12:26:01 +01:00