SMTP server to forward messages to shoutrrr endpoints
Find a file
Felipe M. 361175d6af
Some checks are pending
Release / release (push) Waiting to run
chore: ignore .DS_Store files
2025-02-21 07:58:08 +01:00
.forgejo/workflows ci: added forgejo action for codeberg.org 2025-02-21 07:53:52 +01:00
.woodpecker automation 2024-11-24 11:18:26 +01:00
cmd fix: bundle ca-certs directly in the binary 2025-01-27 21:12:50 +01:00
.gitignore chore: ignore .DS_Store files 2025-02-21 07:58:08 +01:00
.goreleaser.yml ci: build deb, rpm and apk packages 2024-11-24 12:12:11 +01:00
backend.go fix: ignore recipient if no target is set (aider fix) 2024-12-02 16:32:11 +01:00
config.go feat: Add catch-all recipient configuration to Config struct 2024-12-02 16:29:03 +01:00
Containerfile fix: bundle ca-certs directly in the binary 2025-01-27 21:12:50 +01:00
email.go refactor: Reorganize SMTP2Shoutrrr code into separate files 2024-12-02 16:23:49 +01:00
go.mod deps: go-toolkit to v0.1.0 2025-02-21 07:52:59 +01:00
go.sum deps: go-toolkit to v0.1.0 2025-02-21 07:52:59 +01:00
LICENSE Initial commit 2024-11-13 15:32:54 +01:00
Makefile chore: unused vars in makefile 2024-12-02 16:32:49 +01:00
README.md docs: Add catch-all recipient configuration to README 2024-12-02 16:33:48 +01:00
server.go refactor: Reorganize SMTP2Shoutrrr code into separate files 2024-12-02 16:23:49 +01: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"

# Shoutrrr service to forward emails to
[[Recipients]]
# Email addresses to forward emails from
Addresses = ["some@email.com"]
# Shoutrrr service to forward emails to
# See shoutrrr documentation: https://containrrr.dev/shoutrrr/
Target = "ntfy://ntfy.sh/my-ntfy-topic?tags=thing"

# Note: Repeat [[Recipients]] as needed

# Optional: Configure a catch-all recipient for unmatched email addresses
[CatchAll]
# Shoutrrr service to forward unmatched emails to
Target = "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/.