EMAIL_SMTP_PASS env variable bug #409

Closed
opened 2026-04-05 17:09:15 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Sepzilla on 1/1/2026

Describe the Bug

I want to use docker secrets for SERVER_SECRET and EMAIL_SMTP_PASS. while SERVER_SECRET works just fine, the smtp password seems to be affected by a bug.

unlike #2092, the secret is indeed passed to the container at /run/secrets/PASSWRD_FILE and does overwrite smtp_pass that is in config.yml, yet it still fails. Even with passwords being exactly the same, using smtp_pass alone will work but when adding the docker secret file [that will output the same password if you cat the mounted file from within the container] it fails to authenticate.

I've tried all other variations that I could think of between the three fil

Bug Report.md

es and the spelling/syntax; but nothing seems to do it from my end other than not using environment variables for smtp and leaving the password in config.yml.

Environment

  • OS Type & Version: docker
  • Pangolin Version: 1.14.1
  • Gerbil Version: 1.3.0
  • Traefik Version: 3.4.0

To Reproduce

  • create text files for smtp password and server secret.
  • add files as secrets to docker in compose file and add as environment variables to the pangolin service.
  • fill in additional required parameters needed for email in config.yml.
  • create the container and then using a whitelisted email address try to send an OTP.
  • portal returns: "Failed to send one-time otp. Make sure the email address is correct and try again"

for a complete check do

  1. only docker secret: wont work
  2. only smtp_pass in config.yml: will work
  3. leave the working config.yml as is, but switch back to using docker secret: wont work

one note: when the email address is in fact incorrect the error mentions checking the whitelist so the second part of that error doesn't necessarily apply.

Expected Behavior

authenticate with smtp server and send OTP.

*Originally created by @Sepzilla on 1/1/2026* ### Describe the Bug I want to use docker secrets for `SERVER_SECRET` and `EMAIL_SMTP_PASS`. while `SERVER_SECRET` works just fine, the smtp password seems to be affected by a bug. unlike #2092, the secret is indeed passed to the container at `/run/secrets/PASSWRD_FILE` and *does* overwrite `smtp_pass` that is in `config.yml`, yet it still fails. Even with passwords being exactly the same, using `smtp_pass` alone will work but when adding the docker secret file [that will output the same password if you cat the mounted file from within the container] it fails to authenticate. I've tried *all* other variations that I could think of between the three fil [Bug Report.md](https://github.com/user-attachments/files/24403436/Bug.Report.md) es and the spelling/syntax; but nothing seems to do it from my end other than not using environment variables for smtp and leaving the password in `config.yml`. ### Environment - OS Type & Version: docker - Pangolin Version: 1.14.1 - Gerbil Version: 1.3.0 - Traefik Version: 3.4.0 ### To Reproduce - create text files for smtp password and server secret. - add files as `secrets` to docker in compose file and add as environment variables to the pangolin service. - fill in additional required parameters needed for `email` in config.yml. - create the container and then using a whitelisted email address try to send an OTP. - portal returns: "Failed to send one-time otp. Make sure the email address is correct and try again" for a complete check do 1. only docker secret: wont work 2. only `smtp_pass` in `config.yml`: will work 3. leave the working `config.yml` as is, but switch back to using docker secret: wont work > one note: when the email address is in fact incorrect the error mentions checking the whitelist so the second part of that error doesn't necessarily apply. ### Expected Behavior authenticate with smtp server and send OTP.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#409