smtpproxy

command module
v0.0.0-...-d934c3e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2016 License: GPL-3.0 Imports: 7 Imported by: 0

README

smtpproxy, a Simple Mail Proxy

Build Status

Overview

smtpproxy is a small Go program that accepts messages on port 25 and relays them directly to a relay host, without local storage. This is useful for forwarding your own e-mail addresses to gmail or similar services. smtpproxy also does some minimal spam detection.

Installation

smtpproxy is best run from systemd. It uses environment variables for configuration. See example/defaults for the list of supported options.

go get github.com/jorgenschaefer/smtpproxy
cp $GOPATH/bin/smtpproxy /usr/local/sbin/
cp $GOPATH/src/github.com/jorgenschaefer/smtpproxy/example/smtpproxy.service \
   $GOPATH/src/github.com/jorgenschaefer/smtpproxy/example/smtpproxy.socket \
   /etc/systemd/system/
cp $GOPATH/src/github.com/jorgenschaefer/smtpproxy/example/defaults \
   /etc/default/smtpproxy
systemctl daemon-reload
$EDITOR /etc/default/smtpproxy
systemctl start smtpproxy.socket

Features

  • No local spool or storage at all. The client only receives a success message when the upstream server accepts the mail.
  • Minimum implementation as per RFC 5321 section 4.5.1, with the exception of VRFY.
  • The STARTTLS extension is supported.
  • DNSBL/RBL checks are supported
  • Delayed welcome: The 220 welcome message is sent with a short delay. If the client speaks before its turn, it is tarpitted. This catches a surprising amount of spammers.
  • Tarpit: When a client misbehaves in a bad way, the connection is kept open for some time to slow down spammers.

Contributing

Contributions are welcome. Please do make sure tests run successfully. There’s a ./scripts/test command to run the test suite. When adding code, please try to include tests as well.

This is my first Go program. (Helpful) suggestions for improving the code are very welcome.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL