Wez Furlong b64219bab4 smtp client: belt and suspenders
We've seen evidence in some logs that it is possible to end up
with a protocol synchronization issue where we get back a 354
response (which can only occur from the DATA verb) when we think
we just sent RCPT TO.

It is unclear where the error is coming from as the logic in
the smtp client is already fairly defensive and emits speculative
RSET calls for each message.

What I suspect might be happening is that we somehow encounter
a transient issue where we don't assertively close the connection.
We do have what I considered to be fairly exhaustive handling of
the various error cases in the smtp_dispatcher deliver_message
function, so it's not obvious where the issue might be coming
from.

So, what does this commit do?

* Refactor the smtp client logic code that is responsible for sending
  the request side of things so that we just have two cases, rather
  than the previous handful
* If the write fails either due to a timeout or because of some
  other transport error, we now expliticly break the client by
  clearing out its socket field.  This will prevent continued
  use of the client.
* in smtp_dispatcher, if we end a send with a broken client and
  haven't already propagated an error up to the caller, we will
  raise an error. That will cause the session to try the next
  host in the connection plan or just tear down the session
  depending on the overall state of that session.
2024-11-15 13:42:51 -07:00
2023-03-06 07:53:27 -07:00
2024-11-15 13:42:51 -07:00
2024-11-13 13:15:31 -05:00
2024-09-11 11:00:24 -07:00
2023-02-10 16:44:10 -07:00
2024-11-13 13:50:27 -07:00
2024-11-13 13:50:27 -07:00
2023-02-21 21:18:49 -07:00
2023-02-21 21:18:49 -07:00
2023-03-09 20:56:02 -07:00
2024-09-10 08:00:06 -07:00
2024-10-28 20:45:14 -07:00
2024-07-05 09:48:20 -04:00
2023-06-22 13:50:51 -07:00
2023-02-15 06:51:59 -07:00

KumoMTA

KumoMTA is an open-source Message Transfer Agent (MTA) designed for high-performance outbound email functionality, similar to commercial enterprise MTAs such as Momentum, PowerMTA, and Halon.

The KumoMTA project was founded by a group of email industry veterans with decades of experience building and managing high-performance On-Prem MTAs and is supported by a community of some of the largest senders in the world.

Because it is designed for high-performance sending environments, KumoMTA is for experienced email operations professionals who are accustomed to high-performance sending environments and familiar with DevOps practices.

Learn more in our FAQ and at https://kumomta.com/.

Documentation

You can learn more about KumoMTA from the Documentation.

Community

Real-time discussion is available on Our Discord.

Developers

If you are interested in contributing/extending KumoMTA, take a look at DEVELOPERS.md. The #devel channel on Our Discord is for contributors to discuss KumoMTA development.

Reporting Bugs

See How to Report Bugs.

Getting Help

See How to Get Help. For paid support see https://kumomta.com/support.

Getting Updates

You can subscribe to updates at https://kumomta.com/subscribe, we send updates periodically and will never sell nor share your information.

Talk to Us

We're available to talk about the project, book us at https://cal.com/team/kumomta/talk-with-kumomta.

S
Description
The first Open-Source high-performance MTA developed from the ground-up for high-volume email sending environments.
Readme
37 MiB
Languages
Rust 91.8%
Lua 6.3%
Python 0.9%
Shell 0.8%
JavaScript 0.1%