How to config SMTP Settings in Sentry?
Problem solved:
I updated my Sentry version from 8.22.0 to 9.0.0 with Dockerfile and configure config.yml file as following:
A piece of config.yml on onpremise package:
################ Mail Server ################mail.backend: 'smtp' # Use dummy if you want to disable email entirelymail.host: 'smtp.gmail.com'mail.port: 587mail.username: 'account@gmail.com'mail.password: '********'mail.use-tls: true# The email address to send on behalf ofmail.from: 'account@gmail.com'
Dockerfile:
FROM sentry:9.0-onbuild
Or you can do $ git pull
in onpremise path (to get latest changes).
Finally:
docker-compose builddocker-compose run --rm web upgradedocker-compose up -d
If you are running Docker check your docker-compose.yml
Most likely you overwrite SENTRY_EMAIL_HOST
variable and other variables like the following:
SENTRY_EMAIL_HOST=smtp.gmail.com SENTRY_EMAIL_PORT=587 SENTRY_EMAIL_PASSWORD={pass} SENTRY_EMAIL_USER={email} SENTRY_EMAIL_USE_TLS=true SENTRY_SERVER_EMAIL={email}
https://github.com/getsentry/onpremise/blob/master/docker-compose.yml#L24
I had to rebuild all containers by running docker-compose up --build -d
to get sentry pick up the change. Maybe rebuilding worker
alone is enough but it doesn't take long to rebuild everything anyway.
The reason is that worker
container reads from a copy of the config.yml
. The rebuild process will copy the changed config.yml
into worker
container again.