mirror of
https://github.com/chatmail/core.git
synced 2026-08-11 01:32:47 +03:00
refactor: improve comment (#8366)
It's unclear whether this logic works, but I think we should at least properly document why it exists (I already sent this text while figuring out what the code does, so it was easy making this PR now) Could add a XXX note that it's unsure whether this works
This commit is contained in:
@@ -545,8 +545,15 @@ pub(crate) async fn receive_imf_inner(
|
||||
if mime_parser.incoming {
|
||||
return Ok(None);
|
||||
}
|
||||
// For the case if we missed a successful SMTP response. Be optimistic that the message is
|
||||
// delivered also.
|
||||
|
||||
// It sometimes happens that a slow server (usually a classical email server)
|
||||
// receives a message via SMTP,
|
||||
// but then the connection to the server dies before it sends the OK response.
|
||||
// In order to handle this case, we delete the SMTP send jobs if we receive our own message via IMAP.
|
||||
//
|
||||
// Now, messages with long recipient lists are split into multiple SMTP jobs.
|
||||
// In this case, we only want to delete the SMTP job that was sent to self
|
||||
// because this is the only chunk we can be sure was sent out.
|
||||
let self_addr = context.get_primary_self_addr().await?;
|
||||
context
|
||||
.sql
|
||||
|
||||
Reference in New Issue
Block a user