Skip to content

feat(transport): Remote delivery over SMTP#104

Merged
j-g00da merged 1 commit into
mainfrom
j-g00da/mxdeliv
Apr 15, 2026
Merged

feat(transport): Remote delivery over SMTP#104
j-g00da merged 1 commit into
mainfrom
j-g00da/mxdeliv

Conversation

@j-g00da
Copy link
Copy Markdown
Collaborator

@j-g00da j-g00da commented Mar 23, 2026

Implements a new mode "transport",
that allows filtermail to be used for
remote delivery.

In transport mode, filtermail listens for LMTP
connections, splits messages by domain
and performs delivery to remote MTAs over SMTP.

SMTP client tries to open socket on all resolved
addresses in parallel and uses one that succeeds
the first, fixing the issue described in:
chatmail/relay#900

Extends the built-in SMTP client
with STARTTLS support.

Extends the built-in SMTP server
with LMTP greeting support.

Groundwork required for mxdeliv endpoint
(HTTP channel for MTA-to-MTA communication):
chatmail/relay#900

Signed-off-by: Jagoda Ślązak jslazak@jslazak.com

@j-g00da
Copy link
Copy Markdown
Collaborator Author

j-g00da commented Mar 23, 2026

Note: I only just read #41 (comment) - this may be the correct way of handling this, I didn't include docs as these will probably have to be changed.

Nevertheless, some of this can still be reviewed, especially changes to the smtp_client module (STARTTLS handling; connecting to all resolved addresses in parallel).

Comment thread src/main.rs Outdated
Comment thread src/smtp_client.rs Outdated
Comment thread src/smtp_client.rs Outdated
Comment thread src/smtp_client.rs Outdated
Comment thread src/smtp_client.rs
@j-g00da j-g00da marked this pull request as draft March 24, 2026 12:01
@j-g00da j-g00da force-pushed the j-g00da/mxdeliv branch 5 times, most recently from 6482d67 to c9f0fc7 Compare April 10, 2026 11:09
@j-g00da j-g00da changed the title feat(transport): Custom SMTP transport feat(transport): Remote delivery over SMTP Apr 10, 2026
Comment thread Cargo.toml Outdated
@j-g00da
Copy link
Copy Markdown
Collaborator Author

j-g00da commented Apr 10, 2026

I will write documentation in readme after the code is reviewed in case we still decide to change how some things are handled.

Postfix configuration is here: chatmail/relay#916

@j-g00da j-g00da marked this pull request as ready for review April 10, 2026 11:19
@j-g00da j-g00da requested review from hpk42 and link2xt April 10, 2026 11:19
Comment thread Cargo.toml Outdated
Comment thread src/smtp_client.rs Outdated
Comment thread src/smtp_client.rs Outdated
Comment thread src/smtp_client.rs Outdated
Comment thread src/smtp_client.rs Outdated
Comment thread src/smtp_client.rs Outdated
Comment thread src/transport.rs Outdated
Comment thread src/smtp_client.rs Outdated
@j-g00da j-g00da force-pushed the j-g00da/mxdeliv branch 2 times, most recently from ca0db7b to b904587 Compare April 14, 2026 10:48
@j-g00da j-g00da requested a review from link2xt April 14, 2026 12:59
Comment thread src/smtp_client.rs Outdated
Comment thread src/smtp_client.rs
Comment thread src/smtp_client.rs Outdated
@j-g00da j-g00da requested a review from link2xt April 15, 2026 17:32
Comment thread src/smtp_client.rs Outdated
Implements a new mode "transport",
that allows filtermail to be used for
remote delivery.

In transport mode, filtermail listens for LMTP
connections, splits messages by domain
and performs delivery to remote MTAs over SMTP.

SMTP client tries to open socket on all resolved
addresses in parallel and uses one that succeeds
the first, fixing the issue described in:
chatmail/relay#900

Extends the built-in SMTP client
with STARTTLS support.

Extends the built-in SMTP server
with LMTP greeting support.

Groundwork required for mxdeliv endpoint
(HTTP channel for MTA-to-MTA communication):
chatmail/relay#900

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
@j-g00da j-g00da merged commit 09ffb8e into main Apr 15, 2026
7 checks passed
@j-g00da j-g00da deleted the j-g00da/mxdeliv branch April 15, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants