SMTP server to forward messages to shoutrrr endpoints
  • Go 96%
  • Makefile 2.7%
  • Dockerfile 1.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Full-Stack Developer 29e9343460
All checks were successful
CI / goreleaser-lint (pull_request) Successful in 5s
CI / format (pull_request) Successful in 1m22s
CI / lint (pull_request) Successful in 3m37s
CI / test (pull_request) Successful in 3m32s
CI / build (pull_request) Successful in 5m24s
ci: use the goreleaser from the CI image instead of goreleaser-action
goreleaser-action v7.1.0 made cosign signature verification of its own
download mandatory, and ci-base ships no cosign — the goreleaser-lint
job failed on the v6.4.0 -> v7.2.3 bump.

The action was redundant anyway: ci-base already installs goreleaser
from the upstream apt repo, which is what `make build` has always used.
Both workflows now call it directly, and `goreleaser check` moves behind
a `make check` target so every CI job runs a make target.

Co-authored-by: multica-agent <github@multica.ai>
2026-09-07 16:54:09 +00:00
.github/workflows ci: use the goreleaser from the CI image instead of goreleaser-action 2026-09-07 16:54:09 +00:00
cmd deps: upgrade Go to 1.27.1, refresh dependencies and drop gotoolkit 2026-09-07 16:28:11 +00:00
.gitignore dev: updated golangci-lint to latest and fixed issues 2026-02-04 12:59:15 +01:00
.goreleaser.yml ci: migrate from Woodpecker to Forgejo Actions and simplify dev tooling (#6) 2026-04-07 18:22:04 +02:00
backend.go fix: handle all email content types and preserve query parameters 2026-02-04 16:31:13 +01:00
backend_test.go deps: update 2026-02-04 12:49:10 +01:00
config.go deps: upgrade Go to 1.27.1, refresh dependencies and drop gotoolkit 2026-09-07 16:28:11 +00:00
config_test.go deps: upgrade Go to 1.27.1, refresh dependencies and drop gotoolkit 2026-09-07 16:28:11 +00:00
Containerfile deps: upgrade Go to 1.27.1, refresh dependencies and drop gotoolkit 2026-09-07 16:28:11 +00:00
email.go fix: handle all email content types and preserve query parameters 2026-02-04 16:31:13 +01:00
go.mod deps: upgrade Go to 1.27.1, refresh dependencies and drop gotoolkit 2026-09-07 16:28:11 +00:00
go.sum deps: upgrade Go to 1.27.1, refresh dependencies and drop gotoolkit 2026-09-07 16:28:11 +00:00
LICENSE Initial commit 2024-11-13 15:32:54 +01:00
Makefile ci: use the goreleaser from the CI image instead of goreleaser-action 2026-09-07 16:54:09 +00:00
README.md feat: multiple target support 2026-02-04 12:35:44 +01:00
server.go deps: upgrade Go to 1.27.1, refresh dependencies and drop gotoolkit 2026-09-07 16:28:11 +00:00
server_test.go deps: upgrade Go to 1.27.1, refresh dependencies and drop gotoolkit 2026-09-07 16:28:11 +00:00

smtp2Shoutrrr

A simple SMTP server that forwards incoming emails to a Shoutrrr supported service.

Installing

First generate a new configuration file following this example:

# config.toml
# Port the SMTP server will listen on
Port = 11025

# Credentials for the SMTP server (default to username/password if not set/empty)
Username = "user"
Password = "nometokens"

# Configure recipients to forward emails to

# Multiple Targets (Recommended)
# Use the Targets array to send notifications to multiple services
[[Recipients]]
# Email addresses to forward emails from
Addresses = ["user@example.com"]
# Shoutrrr services to forward emails to
# See shoutrrr documentation: https://containrrr.dev/shoutrrr/
Targets = [
    "ntfy://ntfy.sh/my-ntfy-topic?tags=email",
    "discord://token@id",
    "slack://token@channel"
]

# Single Target (Deprecated)
# The Target field is still supported for backward compatibility
[[Recipients]]
Addresses = ["legacy@example.com"]
Target = "ntfy://ntfy.sh/legacy-topic?tags=thing"  # Will show deprecation warning

# Note: Repeat [[Recipients]] as needed

# Optional: Configure a catch-all recipient for unmatched email addresses
[CatchAll]
# Shoutrrr services to forward unmatched emails to
Targets = ["ntfy://ntfy.sh/catch-all-topic?tags=unmatched"]

From releases

  • Grab the latest release from the releases page
  • Put the configuration file in the same directory as the binary
  • Run the binary for your appropriate platform

From source (development)

  • Clone this repository
  • Put the configuration file in the repository folder
  • Run make quick-run

Using docker

  • Create a config.toml file as described above
  • Run the docker image mounting the Config.toml file as /config.toml and exposing the configured port:
docker run -v /path/to/config.toml:/config.toml \
    -p 11025:11025 \
    git.nakama.town/fmartingr/smtp2shoutrrr:latest

Development

Run the server with:

make quick-run

Send a test email with:

This will read the config.toml in the current directory to set the appropriate SMTP client configuration.

go run ./cmd/sendmail/.