Problem
How to setup a Mail Relay in BitWarden?
How to setup the SMTP Server in BitWarden?
Solution
Follow the guide below to configure BitWarden to use outMail as a Internet Mail Relay.
This article assumes you are running a self-hosted version of BitWarden and that you have already installed it and its working.
In order for BitWarden to send emails via outMail you need to change the SMTP Server settings. This can be achieved by editing the global override environment variables.
Edit the file called bwdata/env/global.override.env and change the following lines
globalSettings__mail__replyToEmail=no-reply@example.com
globalSettings__mail__smtp__host=mxXXXXXX.smtp-engine.com
globalSettings__mail__smtp__port=25
globalSettings__mail__smtp__ssl=false
globalSettings__mail__smtp__username=outmail-username
globalSettings__mail__smtp__password=outmail-password
For the var called globalSettings__mail__smtp__host please enter the outgoing SMTP server you have been assigned to in your welcome email. Likewise your outMail SMTP credentials will also be in your welcome email, these need to go in the vars globalSettings__mail__smtp__username and globalSettings__mail__smtp__password.
Please see the table below for alternative SMTP ports. Outmail supports SSL so it is user choice if you want to enable SSL by changing the var globalSettings__mail__smtp__ssl to true.
For more information on the BitWarden global vars please see the documentation - bitwarden.com/help/article/environment-variables
Summary of server details
Outgoing server |
mxXXXXXX.smtp-engine.com As provided in your signup email. |
Outgoing server protocol |
SMTP |
Outgoing server port |
25, 465, 587, 2525 or 8025 |
Authentication Type |
Basic Authentication, SSL and TLS supported |
Username |
As provided |
Password |
As provided |