Categorygithub.com/chrj/smtpd
modulepackage
0.3.1
Repository: https://github.com/chrj/smtpd.git
Documentation: pkg.go.dev

# README

Go smtpd GoDoc Go Report Card

Package smtpd implements an SMTP server in golang.

Features

  • STARTTLS (using crypto/tls)
  • Authentication (PLAIN/LOGIN, only after STARTTLS)
  • XCLIENT and PROXY protocol (for running behind a proxy)
  • Connection, HELO, sender and recipient checks for rejecting e-mails using callbacks
  • Configurable limits for: connection count, message size and recipient count
  • Hands incoming e-mail off to a configured callback function

Version numbers

The package is tagged with semantic version numbers, making it suitable for use in a Go Module.

Feedback

If you end up using this package or have any feedback, I'd very much like to hear about it. You can reach me by email.

# Constants

Extended SMTP.
SMTP.

# Variables

ErrServerClosed is returned by the Server's Serve and ListenAndServe, methods after a call to Shutdown.

# Structs

Envelope holds a message.
Error represents an Error reported in the SMTP session.
Peer represents the client connecting to the server.
Server defines the parameters for running the SMTP server.

# Type aliases

Protocol represents the protocol used in the SMTP session.