Infisical / infisical

♾ Infisical is the open-source secret management platform: Sync secrets across your team/infrastructure, prevent secret leaks, and manage internal PKI
https://infisical.com
Other
12.97k stars 673 forks source link

SMTP_SECURE=false not working on self hosted #1315

Open l0ll0-21 opened 5 months ago

l0ll0-21 commented 5 months ago

Describe the bug

ENV SMTP_SECURE="false" is not accepted. Even if the ENV is set or the defaut value (false) is used, SMPT still wants to use TLS. On the internal SMPT Sever with Port 25 and without TLS, mailservice is not possible and infisical can not be used like intended.

To Reproduce

Steps to reproduce the behavior:

  1. Run the Infisical Dockerimage v0.43.15
  2. set ENV: SMTP_HOST: xxx SMTP_PORT: 25 SMTP_FROM_ADDRESS: ${SMTP_FROM_ADDRESS} SMTP_FROM_NAME: ${SMTP_FROM_NAME} SMTP_SECURE: "false"

Expected behavior

Sending Mails without TLS.

Screenshots

Platform you are having the issue on:

debian bullseye

alexbarcelo commented 2 months ago

In k8s, it is not working, maybe for the same reasons. In this scenario, the error log is:

{"level":50,"time":1712569005832,"pid":1,"hostname":"infisical-backend-78ccbcb6b4-jxzsr","0":{"received":"","code":"invalid_enum_value","options":["true","false"],"path":["SMTP_SECURE"],"message":"Invalid enum value. Expected 'true' | 'false', received ''"},"severity":"ERROR"}

It is as if infisical was not parsing correctly the environment variable, because I am passing a false value. Moreover, false is the Helm default, and this error appeared after trying to upgrade the infisical image leaving those as defaults. Curiously I tried to put a 0 in the env var and the error was the same (received ''). If I tried to put some garbage, the error changes; it is still "Invalid enum value" but the received shows the garbage.