r/gitea: Configure SMTP mailer

Gitea needs SMTP configuration in order to send e-mail notifications
about e.g. pull requests.  The `gitea_smtp` variable can be defined to
enable this feature.
frigate-exporter
Dustin 2024-08-25 08:46:37 -05:00
parent 1ab0dd3457
commit 3511176c31
2 changed files with 17 additions and 0 deletions

View File

@ -10,3 +10,8 @@ sshd_config_matches:
burp_backup:
- include: /var/lib/gitea
gitea_smtp:
from: gitea@pyrocufflink.net
addr: mail.pyrocufflink.blue
port: 25

View File

@ -36,11 +36,23 @@ OFFLINE_MODE = false
PATH = /var/lib/gitea/data/lfs
[mailer]
{% if gitea_smtp|d %}
ENABLED = true
PROTOCOL = smtp
SMTP_ADDR = {{ gitea_smtp.addr }}
SMTP_PORT = {{ gitea_smtp.port }}
FROM = {{ gitea_smtp.from }}
{% else %}
ENABLED = false
{% endif %}
[service]
REGISTER_EMAIL_CONFIRM = false
{% if gitea_smtp|d %}
ENABLE_NOTIFY_MAIL = true
{% else %}
ENABLE_NOTIFY_MAIL = false
{% endif %}
DISABLE_REGISTRATION = true
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false