Simple Golang SMTP relay/proxy server
Find a file
dependabot[bot] 80eca86f0e build(deps): Bump actions/upload-artifact from 7.0.0 to 7.0.1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](bbbca2ddaa...043fb46d1a)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-15 12:36:32 +02:00
.github build(deps): Bump actions/upload-artifact from 7.0.0 to 7.0.1 2026-04-15 12:36:32 +02:00
aliases.go feat: dynamic reread of aliases 2025-11-08 08:20:02 +01:00
aliases_test.go fix: add tests 2025-11-08 08:20:02 +01:00
auth.go gofmt: Fix formatting 2021-02-16 15:57:50 +00:00
auth_test.go gofmt: Fix formatting 2021-02-16 15:57:50 +00:00
config.go Client certificate for relay 2026-01-14 20:20:08 +01:00
config_test.go Fix code formatting with gofmt -s 2021-04-03 19:00:38 +00:00
go.mod build(deps): Bump golang.org/x/crypto from 0.49.0 to 0.50.0 2026-04-15 12:36:10 +02:00
go.sum build(deps): Bump golang.org/x/crypto from 0.49.0 to 0.50.0 2026-04-15 12:36:10 +02:00
LICENSE Update MIT license template 2018-12-08 21:16:10 +00:00
logger.go Refactor to migrate from sirupsen/logrus to rs/zerolog and integrate DeRuina/timberjack for logfile rotation 2025-08-03 18:47:42 +02:00
main.go feat: dynamic reread of aliases 2025-11-08 08:20:02 +01:00
main_test.go gofmt: Fix formatting 2021-02-16 15:57:50 +00:00
README.md fix: add simple doc 2025-11-08 08:20:02 +01:00
remotes.go Client certificate for relay 2026-01-14 20:20:08 +01:00
remotes_test.go add test coverage for scheme validation 2022-04-21 11:39:41 -05:00
SECURITY.md Create SECURITY.md (#175) 2025-02-04 09:47:27 +01:00
smtp.go Client certificate for relay 2026-01-14 20:20:08 +01:00
smtprelay.ini Client certificate for relay 2026-01-14 20:20:08 +01:00

smtprelay

Go Report Card OpenSSF Scorecard

Simple Golang based SMTP relay/proxy server that accepts mail via SMTP and forwards it directly to another SMTP server.

Why another SMTP server?

Outgoing mails are usually send via SMTP to an MTA (Mail Transfer Agent) which is one of Postfix, Exim, Sendmail or OpenSMTPD on UNIX/Linux in most cases. You really don't want to setup and maintain any of those full blown kitchensinks yourself because they are complex, fragile and hard to configure.

My use case is simple. I need to send automatically generated mails from cron via msmtp/sSMTP/dma, mails from various services and network printers via a remote SMTP server without giving away my mail credentials to each device which produces mail.

Main features

  • Simple configuration with ini file .env file or environment variables
  • Supports SMTPS/TLS (465), STARTTLS (587) and unencrypted SMTP (25)
  • Checks for sender, receiver, client IP
  • Authentication support with file (LOGIN, PLAIN)
  • Enforce encryption for authentication
  • Forwards all mail to a smarthost (any SMTP server)
  • Small codebase
  • IPv6 support
  • Aliases support (dynamic reload when alias file changes)