Coder Social home page Coder Social logo

smtpproxy's Introduction

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/michelvocks/smtpproxy
cp $GOPATH/bin/smtpproxy /usr/local/sbin/
cp $GOPATH/src/github.com/michelvocks/smtpproxy/example/smtpproxy.service \
   $GOPATH/src/github.com/michelvocks/smtpproxy/example/smtpproxy.socket \
   /etc/systemd/system/
cp $GOPATH/src/github.com/michelvocks/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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.