Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

EHLO verb and SMTP Extensions #17

Closed
kumy opened this issue Apr 8, 2021 · 1 comment · May be fixed by #19
Closed

EHLO verb and SMTP Extensions #17

kumy opened this issue Apr 8, 2021 · 1 comment · May be fixed by #19

Comments

@kumy
Copy link

kumy commented Apr 8, 2021

I've that the current implementation does not respect the "The EHLO verb and SMTP extensions" https://cr.yp.to/smtp/ehlo.html

EHLO is just like HELO except that the server's response text provides computer-readable information about the server's abilities.

Here is what happens if the server accepts EHLO (required code 250). On the first response line, the text begins with the server's name. On each response line past the first, the text is an extension, followed optionally by a space and an argument, followed optionally by a space and another argument, etc.

The extension is a nonempty string of letters, digits, and hyphens. Each argument is a nonempty string of graphical ASCII characters.

A rather extreme example:

     220 size.does.matter.af.MIL (More ESMTP than Crappysoft!)
     EHLO heaven.af.mil
     250-size.does.matter.af.MIL offers FIFTEEN extensions:
     250-8BITMIME
     250-PIPELINING
     250-DSN
     250-ENHANCEDSTATUSCODES
     250-EXPN
     250-HELP
     250-SAML
     250-SEND
     250-SOML
     250-TURN
     250-XADR
     250-XSTA
     250-ETRN
     250-XGEN
     250 SIZE 51200000

The actual response of mini-smtp-server is:

Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 hello
EHLO kumy.net
220 go on...
telnet> quit
Connection closed.

I see some problems here:

The interesting part in https://tools.ietf.org/html/rfc5321#section-4.1.1.1 say

A client SMTP SHOULD start an SMTP session by issuing the EHLO
command. If the SMTP server supports the SMTP service extensions, it
will give a successful response, a failure response, or an error
response. If the SMTP server, in violation of this specification,
does not support any SMTP service extensions,

If I understand this well, if mini-smtp-server supports extension it should report them, if it support none it should return an error. I'm wondering if it actually "support" some extension?

Regarding the response format it is stated:

Normally, the response to EHLO will be a multiline reply. Each line
of the response contains a keyword and, optionally, one or more
parameters. Following the normal syntax for multiline replies, these
keywords follow the code (250) and a hyphen for all but the last
line, and the code and a space for the last line.

So clearly, 220 seems invalid.

Technically, I'm looking for the extension 8BITMIME as in #16 and really wondering if it's "available/supported" here.

https://cr.yp.to/smtp/8bitmime.html

7-bit mailers are obsolete. Do not attempt to deploy a 7-bit mailer on the Internet.

I hope it is!

A list of standard extension is listed here https://cr.yp.to/smtp/ehlo.html

Related to f3-factory/fatfree-core#328 (comment)

@aarongough
Copy link
Owner

This project is no longer under active development and is no longer maintained. Please see MIDI SMTP Server for a possible replacement: https://github.com/4commerce-technologies-AG/midi-smtp-server

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants