Self-Hosted Email
Set up and configure email notifications for your self-hosted Sentry instance
Note
After changing configuration files, re-run the ./install.sh
script, to rebuild and restart the containers. See the configuration section for more information.
It is recommended to use an external SMTP server due to various sender requirements implemented by major email providers, but if you are testing or running a self-hosted Sentry instance on a local network, you can use the built-in SMTP server, powered by exim4. The default configuration is set to use this server. All you need to do is to set a valid address for mail.from
setting in config.yml
and the FQDN of your Sentry instance for SENTRY_MAIL_HOST
in .env
.
If you want to use an external SMTP server you can set the relevant mail.*
settings in config.yml
file and ignore the built-in SMTP server. If you don't have an external SMTP server, yet you need to see sent emails, you can set mail.backend
to console
on your config.yml
file. Refer to our email service documentation for all the details on what each setting means and does.
If your MX records usually resolve to internal private network mail handlers, see this ticket for some pointers.
Warning
Because of the way configuration is layered, if you update mail
settings through the web interface, you will need to also comment out the mail.host: 'smtp'
default in your config.yml
in order for your desired settings to be picked up.
Sentry does not support sending outbound email with any other protocol than SMTP (examples: Sendgrid's API, AWS SES API, Mailgun API). Usually, those services provide SMTP relay that you can use.
Sentry has very limited inbound mail support through Mailgun. You can find all the information regarding how to set this up over at our inbound email service documentation.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").