Docker SMTP settings overwritten

Hello, i’m using version 5.3.2-1-ce-non-root, and set in my docker environment:

EMAIL_DEFAULT_FROM_NAME=vault@mydomain.com.br
EMAIL_DEFAULT_FROM=vault@mydomain.com.br
EMAIL_TRANSPORT_DEFAULT_HOST=mail.mydomain.com.br
EMAIL_TRANSPORT_DEFAULT_PORT=25
EMAIL_TRANSPORT_DEFAULT_USERNAME=
EMAIL_TRANSPORT_DEFAULT_PASSWORD=
EMAIL_TRANSPORT_DEFAULT_TLS=false
EMAIL_TRANSPORT_DEFAULT_CLIENT=mail.mydomain.com.br
EMAIL_DEFAULT_TRANSPORT=default

DB and passbolt containers are up and i’m able to creat first admin user:
”docker compose -f docker-compose.yml exec passbolt ./bin/cake passbolt register_user
-u victor@mydomain.com.br
-f Victor
-l Hugo
-r admin”

Container returned the link to finished the registration, but i didn’t receive the email.
All new access from another browser i shows the message “Check your mailbox!” “We sent you a link to verify your email.
Check your spam folder if you do not hear from us after a while.”
But i didn’t receive nothing, already check the anti spam

After that i tried in GUI “Send test email” in server settings and work! But i still did not receiving messages for new connection.
So i tried to save again settings in GUI and now e-mails for new connections are working!
But the settings doesn’t respect my environment in docker-compose file. Where are this settings saved? How do modify them?

If i want to use only the docker environment how to make this work?

Hello @vhcalaca and welcome to the forum!

SMTP settings are stored in a database (for added security, as they are protected from external, possibly unauthorized, changes). Therefore, they cannot be modified from environment variables and must be edited using the graphical interface.

If you want to use environment variables instead of the database, you must disable this option. If I’m not mistaken, you can do so by setting the PASSBOLT_PLUGINS_SMTP_SETTINGS_ENABLED environment variable to “false,” but I don’t recommend it

Hello @Termindiego25 thanks for the explanation! In this case i will keep using the GUI!

Final question, if i follow the guide of Backup in Docker, in future can i migrate or restore the application and database with all my users,passwords and SMTP settings?

1 Like

Of course. If you make a backup of your database, the keys of the server and the docker-compose or what you use to start your containers with the environment variables, you can create a new instance with all the data.

You should try to make a backup and restore to become familiar with the process and see what happens, so that when there is a disaster, you can do it quickly and without errors

1 Like