2018-08-14 13:11:41 +02:00
# Adjusting email-sending settings (optional)
2019-01-27 20:25:13 +02:00
By default, this playbook sets up an [Exim ](https://www.exim.org/ ) email server through which all Matrix services send emails.
2018-08-14 13:11:41 +02:00
The email server would attempt to deliver emails directly to their final destination.
This may or may not work, depending on your domain configuration (SPF settings, etc.)
By default, emails are sent from `matrix@<your-domain-name>` (as specified by the `matrix_mailer_sender_address` playbook variable).
2018-12-13 09:32:10 +02:00
## Firewall settings
No matter whether you send email directly (the default) or you relay email through another host (see how below), you'll probably need to allow outgoing traffic for TCP ports 25/587 (depending on configuration).
## Relaying email through another SMTP server
If you'd like to relay email through another SMTP server, feel free to redefine a few playbook variables.
2018-08-14 13:11:41 +02:00
Example:
```yaml
matrix_mailer_sender_address: "another.sender@example.com"
matrix_mailer_relay_use: true
matrix_mailer_relay_host_name: "mail.example.com"
matrix_mailer_relay_host_port: 587
matrix_mailer_relay_auth: true
matrix_mailer_relay_auth_username: "another.sender@example.com"
matrix_mailer_relay_auth_password: "some-password"
2018-12-13 08:19:01 +02:00
```
2018-12-13 09:32:10 +02:00
## Troubleshooting
2018-12-13 08:19:01 +02:00
2019-01-27 20:25:13 +02:00
If you're having trouble with email not being delivered, it may be useful to inspect the mailer logs: `journalctl -f -u matrix-mailer` .