-
Notifications
You must be signed in to change notification settings - Fork 272
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
add LMTP support #196
Comments
Hi, I'm interested in LMTP client support. Use case is to receive emails over proprietary protocol and save them to Dovecot using LMTP. Are maintainers interested in this? What changes are required to implement LMTP client support? It seems that it could be simple to implement just like @Elemecca wrote. At least Python does it in a pretty simple way |
Hi guys, I gave it a try on #255, but I am not very experienced with the protocol. So if you are willing to have a look, any feedback would be appreciated. |
So, this is solved by #255. |
LMTP support in the server would be useful for people implementing any kind of mail-handling service that sits behind a standard MTA. LMTP (RFC 2033) is a protocol derived from ESMTP used in local mail delivery applications (e.g. from an MTA like Postfix to a mailbox server like Dovecot). There are only a few differences from ESMTP, so it shouldn't be too difficult to implement within the existing framework.
First, to ensure everyone agrees which protocol they're speaking, LMTP disallows the
HELO
andEHLO
commands and replaces them withLHLO
, which has the same semantics asEHLO
. I think this could be done by just factoring out the implementation ofEHLO
and adding some configuration-based guards/conditions to thehandle_request
matches forHELO
,EHLO
, andLHLO
.Second, while an (E)SMTP server returns a single reply after the final
.
of theDATA
command, an LMTP server returns one reply per recipient address. This is the real point of LMTP: it makes it possible to make a mail delivery server which does not implement a durable queue and full DSN semantics. Since gen_smtp is responsible for generating the protocol response to the completedDATA
command this would require changes, but perhaps just to use a list in the result tuple when in LMTP mode.Implementing LMTP in the client would have similar requirements: send
LHLO
instead ofEHLO
and handle the multiple responses toDATA
and pass them back to the caller. I don't think LMTP client support is as useful as LMTP server support since people are more likely to be implementing some sort of mail-handler that sits behind an MTA than they are to want to write a proper queuing MTA that delivers to LMTP services, but it wouldn't hurt anything either.I'm not very confident in Erlang (I'm using gen_smtp from Elixir), but I may take a crack at adding LMTP support to the server once I get to that point in my project. If someone else wants to implement it please go ahead.
The text was updated successfully, but these errors were encountered: