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

Support STARTTLS for SMTP,IMAP and POP3 #135

Open
buildscientist opened this issue Apr 29, 2016 · 9 comments
Open

Support STARTTLS for SMTP,IMAP and POP3 #135

buildscientist opened this issue Apr 29, 2016 · 9 comments

Comments

@buildscientist
Copy link
Member

buildscientist commented Apr 29, 2016

None of the GreenMail services (IMAP,POP3,SMTP) support the STARTTLS command as specified in RFC 2487 (SMTP) and RFC 2595 (IMAP&POP3)

At the very least we should respond stating that the command isn't supported - when it is issued by the client.

It should be doable considering we already have support for SSL based connections. We would need to implement the appropriate handshake as stated in the RFC's and convert the existing Socket connection to an SSLSocket.

See this handy StackOverFlow post for more details.

@buildscientist buildscientist changed the title Greenmail doesn't support STARTTLS command Support STARTTLS for SMTP,IMAP and POP3 Apr 29, 2016
@vinaysshenoy
Copy link

@buildscientist Is this being actively worked on? I need this feature to test a mail client I'm writing.

If not, I can do it myself and submit a PR when I get some time(probably in the next couple of weeks).

@vinaysshenoy
Copy link

vinaysshenoy commented Aug 23, 2016

I've added tentative support for STARTTLS for SMTP in my fork. You can check out the diffs HERE. This was implemented based on RFC3207.

If this looks ok, I can go ahead with implementing it for IMAP and POP3 in a similar fashion.

I am also planning to add Apache Commons Net as a Test Dependency and use it to write tests for checking STARTTLS commands.

@swongu
Copy link

swongu commented Sep 9, 2016

Would be great to see this integrated... looking for the same feature.

@buildscientist
Copy link
Member Author

@vinaysshenoy I'm not actively working on this enhancement. Recommend that you submit a PR (please make sure appropriate tests are included).

Thanks.

@carlmolemans
Copy link

carlmolemans commented Jul 9, 2020

Status on this? Is this planned for the near future or not? Alot of cloud mail providers require STARTTLS, it would therefore be opportune to have this functionality available in GreenMail.

@shark300
Copy link

Are there any updates about this issue?

@apinske
Copy link
Contributor

apinske commented Jun 27, 2021

@shark300 Im curious, what exactly do you need this for? We currently support the "implicit TLS" variants, which is the recommended approach as of RFC8314. If you have further use-cases, do you think you would be able to provide a PR?

@pwagland
Copy link

pwagland commented Feb 9, 2022

@apinske we have a use case for this, we have customers that have their mail servers configured in this way, and due to a bug in our code, the STARTTLS started to fail. We do not have control over our customers mail servers, indeed, sometimes our customers don't even have control over them, as that is outsourced.

Ideally this would have been caught by our unit tests, but we we can currently only test SMTP and SMTPS, but not SMTP/STARTTLS.

@rupert-madden-abbott
Copy link

rupert-madden-abbott commented Nov 15, 2023

I would find STARTTLS support helpful because I use Mailtrap in production which only supports STARTTLS: https://help.mailtrap.io/article/40-mailtrap-sending-faqs

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

No branches or pull requests

8 participants