Commit Graph
761 Commits
Author SHA1 Message Date
Wez Furlong f54922b9f0 strip enhanced status code from multi-line responses
Previously we would only remove it from the first line.  This commit
removes it from the second and subseqent lines as well.

The bulk of this commit was a little bit of refactoring to favilitate
testing this change.

refs: #157
2024-03-25 11:55:52 -07:00
Wez Furlong f6f8c55ea4 listener_domains: fix fallback issue
This commit refactors listener_domains.lua to facilitate unit testing
and adds a couple of basic test cases.

The functional change here is that we were missing an explicit
fallback step in the case where no listener or domain matches
the provided values directly; we need to explicitly add a check
against the `*` listener AND `*` domain for the final step.
Previously, we would only look at the `*` listener for the final
step.

closes: #128
2024-03-22 09:48:18 -07:00
Wez Furlong a209a470ff docs: clarify how to access headers in logging templates 2024-03-22 08:08:14 -07:00
Wez Furlong c44d7feee7 docs: changelog for #155 2024-03-20 08:27:46 -07:00
Wez Furlong cb94ad00b0 docs: fix link 2024-03-17 09:36:16 -07:00
Wez Furlong 5596d7cf99 http_listener: allow configuring max request size 2024-03-17 09:35:02 -07:00
Wez Furlong 5063a4671b docs: format generate-toc.py 2024-03-17 07:24:34 -07:00
Tom Mairs d961be87bf Update KumoProxy install instructions 2024-03-15 16:51:35 -06:00
Tom Mairs d285a7f71a Update timeout defaults 2024-03-15 15:18:06 -06:00
Mike Hillyer dbb27a6037 Fixing relative URLs. 2024-03-15 16:39:54 -04:00
Mike Hillyer 37efa0e500 Correct link paths and spelling. 2024-03-15 16:32:20 -04:00
Wez Furlong 5a1999a1b1 Add kumo.make_throttle and throttle_insert_ready_queue event
These allow performing arbitrary rate limiting operations
at both reception time and when messages are moved from the
scheduled queue and into the ready queue.

refs:  https://github.com/KumoCorp/kumomta/issues/149
2024-03-15 12:21:57 -07:00
Tom Mairs 18b0520ca8 typo correction 2024-03-15 13:15:46 -06:00
Tom Mairs 7a7919a9f5 fix URLS 2024-03-15 12:54:02 -06:00
Tom Mairs 5e15003493 spelling corrections 2024-03-15 12:50:56 -06:00
Tom Mairs c48f7f6183 Add sbin utilities 2024-03-15 12:42:59 -06:00
Wez Furlong a8b61ce59e proxy-server: fix missing bind(2) call
Somewhat embarrasing really
2024-03-14 17:51:58 -07:00
Mike Hillyer 5359ec11a9 Adding a link to the page on How to read logs on the troubleshooting page. 2024-03-14 09:49:51 -04:00
Mike Hillyer 35c368b72e Add references to the validate-shaping utility to the userguide. 2024-03-11 15:41:16 -04:00
Tom Mairs 28bd066c9c Add reference for /opt/kumomta/sbin/validate-shaping 2024-03-09 16:25:38 -07:00
Wez Furlong a16a886f0e add requeue_message event
In the end I decided to implicitly make the message due for immediate
delivery in the case where the queue was changed; I couldn't think
of a good reason not to do that, and it simplifies the implementation
both of the event internals for anyone implementing the event
themselves in their lua policy.

refs: https://github.com/KumoCorp/kumomta/issues/149
2024-03-08 13:35:06 -07:00
Wez Furlong 33c7557afb msg: add num_attempts, set_due and queue_name methods
refs: https://github.com/KumoCorp/kumomta/issues/149
2024-03-08 13:35:03 -07:00
Mike Hillyer 9bd6e3d37f Changelog entry for new max_message_rate option. 2024-03-07 17:07:49 -05:00
Wez Furlong 8c43dfe209 add scheduled queue max_message_rate throttle
Needs testing, but I think this will do the job at the raw configuration
level. TSA support for adjusting this setting is a bigger endeavor and
is not included in this commit.

refs: https://github.com/KumoCorp/kumomta/issues/143
2024-03-07 11:00:18 -07:00
Wez Furlong 0d61040815 fix: OOB didn't respect headers and meta config from logger 2024-03-04 13:07:05 -07:00
Wez Furlong aa46113dee mailparsing: improve handling of bad messages
We had a user report problems with an incoming OOB message.
The issue was that `msg:from_header()` would raise an error
because one of the MIME parts in the incoming message had
8-bit data and didn't apply transfer encoding on the offending
part.

It's actually a bit deeper than just missing transfer encoding;
the issue was really that Spam Assassin was employed on the
remote system and it generated an `X-Ham-Report` header that
embedded 8-bit data (looks mostly UTF-8, but had an invalid byte)
in that header without applying RFC2047 header encoding.

```
X-Ham-Report: Spam detection software, running on the system "example.com",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 root\@localhost for details.
 Content preview:  <unencoded binary data here>
```

In the resultant rfc3464 delivery status report, the original
message payload is included as a message/rfc822 part in the body.
So to our parser this looks like a badly encoded body (which it is),
but only because the header in that part was badly encoded.

So this is a double-fail; the Spam Assassin header content
preview logic is generating a non-conforming header, and Exim's
DSN generation at the offending site is generating a non-conforming
message payload.

What this commit does is:

* Adds an `IntoSharedString` trait to encapsulate the conversion
  from String, str or bytes into SharedString.  Previously we
  used a fallible conversion for this, but now this conversion is
  infallible but returns a MessageConformance value. Internally,
  if the data is not UTF-8, we fall back to the lossy conversion
  and flag the part as needing transfer encoding.
* That will allow the parser to return something, even if it is
  slightly mangled by the unicode replacement character. This
  mangling is not a bug: it's a case of "garbage-in, garbage-out".
* This change allows check_fix_conformance to report
  NEEDS_TRANSFER_ENCODING when run in check mode. When run in fix
  mode, the offending part, *including the replacement character*
  will have transfer encoding applied to it. We can't "do better"
  here because the input message is bogus and is missing proper
  transfer encoding.
* Fixes an issue where whitespace from this fixed part was stripped
  out. I'm not sure why whitespace was being stripped; no unit
  tests fail as a result of this change, so it must be good?
2024-02-28 09:56:27 -07:00
Wez Furlong 5bf3d4f3e0 docs: apply proper lua formatting to kafka docs 2024-02-28 09:41:20 -07:00
Wez Furlong f63d352816 update rocksdb and nix versions
closes: https://github.com/KumoCorp/kumomta/pull/145
2024-02-24 10:24:03 -07:00
Wez Furlong c637d200c8 fix: OOB and ARF reports were not logged correctly
As best as I can tell, this is a casualty of a last moment
code format/copy-pasta.  All of the logic works correctly,
but the Reception log record didn't include the relay
disposition so the log_oob or log_arf flag didn't make it
to the logging layer.
2024-02-24 09:20:36 -07:00
Wez Furlong 949f0a6625 code formatting 2024-02-24 09:18:23 -07:00
Mike Hillyer d58a888864 Typo fix for Usage of removed call in Docs #140 2024-02-23 18:01:01 -05:00
Mike Hillyer 72f2c04d47 Add queue-status command to kcli page of userguide. 2024-02-23 13:12:09 -05:00
Mike Hillyer 5de96b6726 Add reference to the queue helper apply method. 2024-02-20 18:42:35 -05:00
Mike Hillyer 6e20464529 Remove some leftover AMQP references from the Kafka page. Spoiler alert: I copied the AMQP page and change it to be a Kafka page since they use the same mechanism. 2024-02-15 12:32:01 -05:00
Mike Hillyer 1d1354b82f Add the release info to the docs. 2024-02-13 14:31:44 -05:00
Mike Hillyer 066013da6c Adding the dev branch marker to Kafka. 2024-02-13 14:28:44 -05:00
Mike Hillyer 1a1042c12f Fix the error. 2024-02-13 14:22:11 -05:00
Mike Hillyer 43817b7ff9 Typo fix to force another mkdocs pass. 2024-02-13 14:02:54 -05:00
Mike Hillyer c62ee2f8e2 First pass Kafka Docs 2024-02-13 13:47:08 -05:00
Wez Furlong 82c9541fcd ci: docs: try using the woodpecker plugin for mkdocs 2024-02-09 13:21:44 -07:00
Wez Furlong e93002c22d ci: docs: try using podman instead of docker(!)
It's a PITA to bootstrap the docker daemon, and pointing it to the host
daemon to sidestep all that is insecure and should not be trusted in a
public repo like this.

So, let's just try podman for this: it doesn't need a daemon and
doesn't need any special privs.
2024-02-09 12:57:08 -07:00
Mike Hillyer 8624da376a Fixing what I thought was a problem, but the build isn't happening which was probably the issue in the first place. 2024-02-09 10:26:03 -05:00
Mike Hillyer cfd5687300 More attempts to fix ordering and indentation. 2024-02-09 10:06:43 -05:00
Mike Hillyer ab1c84c7e1 Trying to correct the restart of the step numbering. 2024-02-09 09:46:43 -05:00
Wez Furlong 4bc099821b docs: fix broken faq links 2024-02-08 08:12:29 -07:00
Wez Furlong f1de881ebb docs: switch to using docker based mkdocs
ubuntu is making it awkward to use pip for user-installed stuff,
so let's just use the docker image.
2024-02-08 08:09:53 -07:00
Wez Furlong 15ac793f89 docs: clarify docker information 2024-02-08 08:04:55 -07:00
Wez Furlong a1515e00aa docs: changelog for #135 2024-02-07 10:43:39 -07:00
Wez Furlong 14bfa1be78 docs: format generate-toc.py 2024-02-06 13:49:12 -07:00
Mike Hillyer 1f9e8e51d2 Added a couple of FAQ entries on migrations. 2024-01-24 16:58:33 -05:00