Draft
Conversation
Collaborator
Author
|
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 |
j-g00da
commented
Mar 23, 2026
src/main.rs
Outdated
Comment on lines
+141
to
+164
| let handler = Arc::new( | ||
| // We want to panic here if the handler cannot be created. | ||
| IncomingBeforeQueueHandler::new(config.clone(), skip_dkim).unwrap(), | ||
| ); | ||
| let max_size = config.max_message_size; | ||
|
|
||
| let mut server_set = tokio::task::JoinSet::new(); | ||
|
|
||
| let addr_smtp = (config.filtermail_host, config.filtermail_smtp_port_incoming); | ||
| let handler_smtp = handler.clone(); | ||
| server_set | ||
| .spawn(async move { run_smtp_server(&addr_smtp, handler_smtp, max_size).await }); | ||
| log::debug!( | ||
| "Incoming SMTP server listening on {}:{}", | ||
| addr_smtp.0, | ||
| addr_smtp.1 | ||
| ); | ||
|
|
||
| while let Some(result) = server_set.join_next().await { | ||
| if let Err(e) = result { | ||
| eprintln!("Server error: {}", e); | ||
| process::exit(1); | ||
| } | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
This is a groundwork for mxdeliv as this way I can later easily spawn here a http server along smtp one.
link2xt
reviewed
Mar 23, 2026
hpk42
reviewed
Mar 23, 2026
Signed-off-by: Jagoda Ślązak <[email protected]>
68b6578 to
d1ec30a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements a new mode "transport",
that allows filtermail to be used as a
postfix pipe transport replacing postfix smtp client.
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.
Groundwork required for mxdeliv endpoint
(HTTP channel for MTA-to-MTA communication):
chatmail/relay#900