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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug: NC_SMTP_SECURE is always true #6124

Closed
1 task done
RuriRyan opened this issue Aug 3, 2023 · 3 comments 路 Fixed by #6125
Closed
1 task done

馃悰 Bug: NC_SMTP_SECURE is always true #6124

RuriRyan opened this issue Aug 3, 2023 · 3 comments 路 Fixed by #6125
Assignees
Labels
馃悰 Type: Bug Something is broken or incorrect unexpectedly.
Milestone

Comments

@RuriRyan
Copy link
Contributor

RuriRyan commented Aug 3, 2023

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Steps to reproduce ?

We're running NocoDB in kubernetes and inject environment variables via kubernetes secrets. This shouldn't really matter how the variables got there, but just for completion purposes.

Whenever NocoDB restarts, for whatever reason, the value of NC_SMTP_SECURE is true, as we can't really check the value, we use the App Store to validate the config and then the Secure checkbox is true, as you can see in the screenshot below.
I manually checked the env variables inside the container to double check the value and as indicated by the second screenshot, the value of NC_SMTP_SECURE was actually false. Yet it still showed as true in the GUI settings. And of course sending mails didn't work.

The documentation states:

NC_SMTP_SECURE - For SMTP plugin (Optional) - To enable secure set value as true any other value treated as false

I didn't test any other values for NC_SMTP_SECURE, but removing it "fixed" the problem as now the value is actually false, even after a restart (confirmed by checking the config via the App Store again).

Either there's a bug somewhere with the interpreting of environment variables, or the documentation is wrong.

Desired Behavior

The value of NC_SMTP_SECURE should actually matter.

Project Details

Node: v16.20.0
Arch: x64
Platform: linux
Docker: true
RootDB: pg
PackageVersion: 0.109.6

Attachments

rustdesk_RSvMSCVb2X
rustdesk_rFfte76udu

@wingkwong
Copy link
Member

After checking the code, NC_SMTP_SECURE is used when NC_SMTP_FROM, NC_SMTP_HOST and NC_SMTP_PORT are provided. It will update SMTP configure in nc_plugins_v2 table. Besides, I checked the value of NC_SMTP_SECURE with different values and they were expected. I didn't see secure is always true. If you've an access to your NC_DB, you may check the config of SMTP in nc_plugins_v2 table.

@RuriRyan
Copy link
Contributor Author

RuriRyan commented Aug 3, 2023

When readding NC_SMTP_SECURE:
rustdesk_gI2436DPu3
I get an additioal "field" (?) in the DB, marked with yellow:
rustdesk_NyiY0EgeD1
This is also false, so far so good.

But sending emails still fails and the UI again shows secure as true.
rustdesk_eDbKkug9ev

@wingkwong
Copy link
Member

@RuriRyan Thanks for the screenshot. I got the problem now.

@wingkwong wingkwong added the 馃悰 Type: Bug Something is broken or incorrect unexpectedly. label Aug 3, 2023
@wingkwong wingkwong self-assigned this Aug 3, 2023
@wingkwong wingkwong added this to the 0.109.7 milestone Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃悰 Type: Bug Something is broken or incorrect unexpectedly.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants