MCPcopy Index your code
hub / github.com/decke/smtprelay

github.com/decke/smtprelay @v1.14.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.14.0 ↗ · + Follow
87 symbols 249 edges 12 files 27 documented · 31%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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)

Core symbols most depended-on inside this repo

Close
called by 20
smtp.go
addrAllowed
called by 18
main.go
cmd
called by 13
smtp.go
hello
called by 11
smtp.go
AliasLoadFile
called by 7
aliases.go
validateLine
called by 6
smtp.go
LoginAuth
called by 6
smtp.go
LoadAliases
called by 5
aliases.go

Shape

Function 60
Method 20
Struct 6
TypeAlias 1

Languages

Go100%

Modules by API surface

smtp.go28 symbols
config.go12 symbols
main.go11 symbols
aliases_test.go9 symbols
main_test.go7 symbols
auth.go7 symbols
remotes_test.go3 symbols
aliases.go3 symbols
remotes.go2 symbols
logger.go2 symbols
auth_test.go2 symbols
config_test.go1 symbols

For agents

$ claude mcp add smtprelay \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact