Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] EHLO response in a single packet? #389

Open
Salvoxia opened this issue Nov 15, 2023 · 0 comments
Open

[Question] EHLO response in a single packet? #389

Salvoxia opened this issue Nov 15, 2023 · 0 comments

Comments

@Salvoxia
Copy link

Hi,

I'm going out on limb here and I don't expect much to come from this, but I'd figured I give it a shot anyway.

I need a really dumb application to send emails to another application using aiosmtpd as the SMTP server component (Mailrise), and that dumb application seems to have problems establishing a proper conversation with aiosmtpd.
When testing with an SMTP server my hoster provides, it seems to work fine. So I fired up Wireshark to capture the communication in both cases and find differences.
The working example looks like this:
smtp_Working

Take a closer look at the EHLO repsone:
singlePacketEHLOReply
The way I interpret this is that the server lists all of its capabilities in a single packet.
The client determines that STARTTLS is supported and continues to initialize a TLS connection. All good so far.

Now here's the conversation with aiosmtpd:
aiosmtpd
In response to the client's EHLO a bunch of 250 replies are sent, listing all the server's capabilities, this time as separate packets. However, as soon as the second 250 repsonse is received, the dumb client seems to fall back to HELO. While the server is still sending its capabilities, the client seems to interpret each 250 response as an OK to go ahead with sending the mail. Now client and server are out of sync, the client dumps the mail payload while the server is not ready, and the client thinks everything went fine and terminates the connection while the server just finished listing its capabilities.

Of course the actual problem here is with the dumb client application rushing the conversation and not waiting for the server to finish. But it looks like its working if the EHLO repsonse is a single packet.

Does my interpretation sound correct? And if so, is there a way for aiosmtpd to bundle the complete EHLO response in a single packet as well?
I realize all of this is not actually a problem for you, since I'm dealing with an SMTP client that doesn't seem to play by the rules 100% correctly, but I figured I'd give it a try and task :)

Any comment is much appreciated!

Best Regards,
Salvoxia

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

No branches or pull requests

1 participant