-
Notifications
You must be signed in to change notification settings - Fork 266
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 as an option for the protocol implementation #255
Conversation
gen_smtp_server_session already aggregate all the recipients in a non empty list of strings, no extra checks are required.
This change in naming is compatible with the common jargon, and is also used in other softwares. For example, the mstmp client defines a `--protocol=smtp|lmtp` option (https://manpages.debian.org/testing/msmtp-mta/sendmail.8.en.html)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think it looks quite good, but I have no experience with LMTP. Would really appreciate if you implement the changes I asked for.
- Combine similar clauses of `gen_smtp_server_session:randle_request` for HELLO, EHLO and LHLO. - Move `report_recipient` and `queue_or_delivery` to the ends of their documents, so functions are defined "from top to down".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the review @seriyps. This is also the first time I am working with LMTP, so I am not that experienced either. What I did was to follow RFC2033 and the recommendations of @Elemecca / @Shemeikka on #196. Maybe they have a bit more experience and could also have a look? To increase my confidence with the code, I did implement a quick experiment using OpenSMTPD to deliver local emails via LMTP to gen_smtp. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged! Thanks @abravalheri @mworrell |
Hello,
I would like to thank the maintainers for the amazing work and propose this PR as my attempt to add support for LMTP. This feature was requested in #196, and is something I find very appropriate, mainly because of the following reasons:
The implementation I attempted follow more or less the guidelines stablished in #196 and any suggestions for improvement are welcome (in fact this is my very first time writing something in Erlang, so still learning...).
I have also implemented a proof of concept/integration test using OpenSMTPD and docker in https://github.com/abravalheri/lmtp_poc, and things seem to work fine.
Unfortunately I was not able to think in an easy solution for optimising the separation of concerns without requiring duplication of code, but if the maintainers have any ideas and would like to guide me in the process, I am open to go through more iterations of this PR.