-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
TLSRequired option from smtpd not supported #241
Comments
Thanks for your very detailed report @allesdavid, that's very helpful! Clearly you have more understanding than I do at this point of how this is expected to work, so maybe you can help clarify some things for me? Currently Mailpit (more specifically smtpd) requires by default TLS for SMTP logins ( If this is correct, are my following assumptions also correct: To use
Do I understand this all correctly? |
Hi @axllent and thank you for your answer. Please find below some clarifications:
Yes, certificate and key must be provided
It's not so clear in the RFC but it wouldn't make sense otherwise. So yes, they should be mutually exclusive in my point of view.
Yes, that's right, it's just requiring TLS encryption from the beginning without implying a required authentication following the TLS handshake (from a RFC point of view).
|
@allesdavid This feature has now been released in v1.13.1. Please test and let me know if this works as you expected? Thanks. |
Hi @axllent thank you for your update, we will test it and let you know the results. |
Hi @axllent, I made some tests and it is working as expected.
Trying to auth without TLS before (v1.10): bash-5.0$ telnet <server> 587
220 mailpit-58c6fcd56-cnz59 Mailpit ESMTP Service ready
ehlo test
250-mailpit-58c6fcd56-cnz59 greets test
250-SIZE 0
250-STARTTLS
250-AUTH LOGIN PLAIN
250 ENHANCEDSTATUSCODES
AUTH LOGIN
334 VXNlcm5hbWU6
<login>
334 UGFzc3dvcmQ6
<password>
235 2.7.0 Authentication successful Trying to auth without TLS now (v1.13.1): bash-5.0$ telnet <server> 587
220 mailpit-86bbdbfb64-2rgvv Mailpit ESMTP Service ready
ehlo test
250-mailpit-86bbdbfb64-2rgvv greets test
250-SIZE 0
250-STARTTLS
250-AUTH LOGIN PLAIN
250 ENHANCEDSTATUSCODES
AUTH LOGIN
530 5.7.0 Must issue a STARTTLS command first Thank you, Im closing the issue. |
Context
We're working on a java application that is not currently enforcing STARTTLS usage for email sending with standard java API.
When we contact our client smtp gateway, which is requiring that the client perform a TLS negotiation before accepting any commands, we received a "530 5.7.0 Must issue a STARTTLS command first", as stated in the RFC 3207 https://www.ietf.org/rfc/rfc3207.txt.
We wanted to use mailpit as an email/SMTP validation tool for our development activities to validate the correct fixing of the application implementation regarding TLS negociation enforcement.
So we run mailpit with following command line:
mailpit --smtp-auth-file /path/to/password-file --smtp-tls-cert /path/to/cert.pem --smtp-tls-key /path/to/key.pem
Expected
"530 5.7.0 Must issue a STARTTLS command first" error due to no current TLS negotiation before send command not in the include list of the RFC.
Actual
Mailpit process the request and email is sent without further warning/error.
Analysis
TLSRequired
as seen here.TLSRquired
is not honored.It would be really nice to have this option (command line/env var) to set the TLSRequired on/off at mailpit level.
The text was updated successfully, but these errors were encountered: