Forgejo: send email through our own mail server (notifications, password resets, account confirmation) #638

Open
opened 2026-10-10 10:54:07 +00:00 by sky_line · 0 comments
Owner

Forgejo on starswirl can't send email today: /etc/forgejo/app.ini has [mailer] ENABLED = false. Hook it up to our own mail system so it can send notifications, password resets and account emails.

Do

  1. Sender: choose the address (e.g. noreply@slipstreamviewer.org, or one on an existing mail domain) and create a dedicated SMTP submission account for it on our mail server, with its own password. Don't reuse a person's account.
  2. DNS for the sending domain: make sure SPF, DKIM and DMARC cover the mail server sending as that address, so Forgejo mail doesn't land in spam. slipstreamviewer.org already has MTA-STS. Check deliverability to Gmail/Outlook (mail-tester, headers).
  3. Forgejo app.ini: back up first, as app.ini.bak-mailer-<date>.
    [mailer]
    ENABLED   = true
    PROTOCOL  = smtp+starttls     ; or smtps (465) -- whatever the mail server offers
    SMTP_ADDR = <mail server, LAN address if reachable>
    SMTP_PORT = 587
    FROM      = "Slipstream Git" <noreply@...>
    USER      = <submission account>
    PASSWD    = <secret>           ; root-only file, never in git or tickets
    
    Then restart Forgejo.
  4. Test: Site Administration -> Configuration -> "Send testing email". Then a real notification: watch a repo and get a comment email.
  5. Decide the [service] options:
    • REGISTER_EMAIL_CONFIRM: require email confirmation for new accounts.
    • ENABLE_NOTIFY_MAIL: notification emails on by default.
    • Whether password reset by email is offered.
  6. Relay integration (optional): bug-report reporters are anonymous; email is not part of #527. Keep it that way unless decided otherwise.

Notes

  • [service] DOMAIN = 192.168.96.20 is the SSH clone host. Mail links use ROOT_URL (https://git.slipstreamviewer.org/), which is already correct.
  • Rate limits: Forgejo sends from a queue. Make sure the mail server's per-account limits won't block a burst (e.g. many watchers on a release).

Server change: owner approval required for each step on starswirl / the mail host.

Forgejo on starswirl can't send email today: `/etc/forgejo/app.ini` has `[mailer] ENABLED = false`. Hook it up to our own mail system so it can send notifications, password resets and account emails. ## Do 1. **Sender:** choose the address (e.g. `noreply@slipstreamviewer.org`, or one on an existing mail domain) and create a dedicated SMTP submission account for it on our mail server, with its own password. Don't reuse a person's account. 2. **DNS for the sending domain:** make sure SPF, DKIM and DMARC cover the mail server sending as that address, so Forgejo mail doesn't land in spam. slipstreamviewer.org already has MTA-STS. Check deliverability to Gmail/Outlook (`mail-tester`, headers). 3. **Forgejo `app.ini`:** back up first, as `app.ini.bak-mailer-<date>`. ```ini [mailer] ENABLED = true PROTOCOL = smtp+starttls ; or smtps (465) -- whatever the mail server offers SMTP_ADDR = <mail server, LAN address if reachable> SMTP_PORT = 587 FROM = "Slipstream Git" <noreply@...> USER = <submission account> PASSWD = <secret> ; root-only file, never in git or tickets ``` Then restart Forgejo. 4. **Test:** Site Administration -> Configuration -> "Send testing email". Then a real notification: watch a repo and get a comment email. 5. **Decide the `[service]` options:** - `REGISTER_EMAIL_CONFIRM`: require email confirmation for new accounts. - `ENABLE_NOTIFY_MAIL`: notification emails on by default. - Whether password reset by email is offered. 6. **Relay integration (optional):** bug-report reporters are anonymous; email is not part of #527. Keep it that way unless decided otherwise. ## Notes - `[service] DOMAIN = 192.168.96.20` is the SSH clone host. Mail links use `ROOT_URL` (`https://git.slipstreamviewer.org/`), which is already correct. - **Rate limits:** Forgejo sends from a queue. Make sure the mail server's per-account limits won't block a burst (e.g. many watchers on a release). Server change: owner approval required for each step on starswirl / the mail host.
sky_line added this to the Slipstream project 2026-10-10 10:54:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#638
No description provided.