opendatadiscovery / odd-platform

First open-source data discovery and observability platform. We make a life for data practitioners easy so you can focus on your business.
https://opendatadiscovery.org
Apache License 2.0
1.19k stars 99 forks source link

SMTP email notification auth - optional #1697

Closed SamuelAdamsMcGuire closed 2 weeks ago

SamuelAdamsMcGuire commented 2 weeks ago

Is your proposal related to a problem?

The problem is that email notifications if the smtp server does not require TLS auth.

Describe the solution you'd like

Make these config variables configurable:

"mail.transport.protocol" "mail.smtp.auth" "mail.smtp.starttls.enable"

and this should in turn be optional

notifications.receivers.email.password

Describe alternatives you've considered

I have attempted to overwrite these in the config and only get errors:

Mail server connection failed. Failed messages: jakarta.mail.MessagingException: Could not convert socket to TLS;

I tried to pass placeholders for the receivers email password. Sadly nothing has worked

Additional context

I am available in your slack under Samuel McGuire. Please feel free to get in touch.

(Write your answer here.)

Vladysl commented 2 weeks ago

Hi, many thanks for your feedback. We'll take it to the backlog and try to implements as soon as possible. Could you please let me know, is it blocker for you ? Because we should know the priority of this feature. Once again, many thanks

SamuelAdamsMcGuire commented 2 weeks ago

Thanks for your quick reply. It is for a project I have been working on for a large German airline. They need it yesterday ;) So the sooner it is possible the better for me. Thanks again.

Vladysl commented 2 weeks ago

Got it, I'll let you know once it will be done

Vladysl commented 2 weeks ago

Implemented in https://github.com/opendatadiscovery/odd-platform/pull/1698

SamuelAdamsMcGuire commented 2 weeks ago

Thanks. Are the above listed variables now configurable and under the same naming convention as listed?

Vladysl commented 2 weeks ago

Renamed: notifications.receivers.email.smtp was renamed to notifications.receivers.email.host New: notifications.receivers.email.protocol - string notifications.receivers.email.smtp.auth - boolean notifications.receivers.email.smtp.starttls - boolean The same: notifications.receivers.email.sender notifications.receivers.email.password notifications.receivers.email.port notifications.receivers.email.notification.emails

Also about notifications.receivers.emails.protocol values:

1. smtp (Simple Mail Transfer Protocol) Required properties: mail.smtp.host: The SMTP server to connect to. mail.smtp.port: The port to connect to (usually 25, 465 for SMTPS, or 587 for STARTTLS). mail.smtp.auth: Set to true if the server requires authentication. If mail.smtp.auth is true: mail.smtp.user: The username for authentication. mail.smtp.password: The password for authentication. Optional properties: mail.smtp.starttls.enable: Set to true to use STARTTLS if supported. mail.smtp.ssl.enable: Set to true to use SSL.

2. smtps (SMTP over SSL) Required properties: Same as smtp, but typically with SSL-specific settings. Optional properties: mail.smtps.ssl.checkserveridentity: If set to true, checks the server identity as part of the SSL handshake. mail.smtps.ssl.trust: Specifies the SSL certificates to trust.

3. imap (Internet Message Access Protocol) Required properties: mail.imap.host: The IMAP server to connect to. mail.imap.port: The port to connect to (usually 143, or 993 for IMAPS). mail.imap.user: The username for authentication (if required). mail.imap.password: The password for authentication (if required). Optional properties: mail.imap.ssl.enable: Set to true to use SSL. mail.imap.starttls.enable: Set to true to use STARTTLS.

4. imaps (IMAP over SSL) Required properties: Same as imap, but with SSL-specific settings. Optional properties: Similar SSL-related properties as with smtps.

5. pop3 (Post Office Protocol 3) Required properties: mail.pop3.host: The POP3 server to connect to. mail.pop3.port: The port to connect to (usually 110, or 995 for POP3S). mail.pop3.user: The username for authentication (if required). mail.pop3.password: The password for authentication (if required). Optional properties: mail.pop3.ssl.enable: Set to true to use SSL. mail.pop3.starttls.enable: Set to true to use STARTTLS.

6. pop3s (POP3 over SSL) Required properties: Same as pop3, but with SSL-specific settings. Optional properties: Similar SSL-related properties as with smtps.

P.S. I'll close this issue once we will publish new release. I think it will be in the next couple of days

SamuelAdamsMcGuire commented 2 weeks ago

Beautiful. Thanks for the quick turn around

Vladysl commented 2 weeks ago

released - https://github.com/opendatadiscovery/odd-platform/releases/tag/0.27.3