This guide outlines the email configuration so that you can send out email invitations. Many thanks to @philippneugebauer, @vaskozl, ahgraber, and everyone in #61 for contributing.
In order to send out emails, you need a working SMTP service - you can host your own or rely on a service such as Gmail.
The entire email configuration is stored in the MSMTPRC
environment variable.
If you have an SMTP server without security in place, i.e. no authentication or SSL/TLS/STARTTLS, then you only have to configure the SMTP server name. Needless to say it's highly recommended to have authentication and TLS in place.
services:
baikal:
image: ckulka/baikal:nginx
environment:
MSMTPRC: |
defaults
account default
host <smtp host>
port 25
If you have TLS and authentication in place, add the following configuration parameters:
services:
baikal:
image: ckulka/baikal:nginx
restart: always
environment:
MSMTPRC: |
defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
account default
host <smtp host>
port 587
from [email protected]
user <user>
password <password>
See examples/docker-compose.email.yaml for a starter template.
If you use Gmail as your SMTP server, you have to first allow less secure apps (sendmail) to use Gmail, see Less secure apps & your Google Account.
Once that is done, use the following configuration:
services:
baikal:
image: ckulka/baikal:nginx
environment:
MSMTPRC: |
defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
account default
host smtp.gmail.com
port 587
from <user>@gmail.com
user <user>
password <password>
See examples/docker-compose.sendmail-gmail.yaml for a starter template.