gosmtpd

command module
Version: v0.0.0-...-9d63604 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

README

A very simple SMTP server with a REST API

build status Go Report Card

A server that accepts smtp request and saves the emails in memory for later retrieval.

Usage

usage: gosmtpd [<flags>]

Flags:
  --help                  Show context-sensitive help (also try --help-long and --help-man).
  --webport="8000"        Port the web server should run on
  --hostname="localhost"  Hostname for the smtp server to listen to
  --port="2525"           Port for the smtp server to listen to
  --forwardhost=""        The hostname after the @ that we should forward i.e. gmail.com
  --forwardsmtp=""        SMTP server to forward the mail to
  --forwardport="25"      The port on which email should be forwarded
  --forwarduser=""        The username for the forward host
  --forwardpassword=""    Password for the user
  --mailexpiration=300    Time in seconds for a mail to expire, and be removed from database
  --version               Show application version.

GET /status

Returns a 200 if the service is up

GET /inbox

List all emails in the system

GET /inbox/:email

List all email for a given email address

GET /inbox/:email/:id

Get a specific email by id

GET /inbox/:email/listen

Creates a Websocket connection, that can be used for listing to updates on the email account

DELETE /inbox/:email

Delete all mails for a given email

DELETE /inbox/:email/:id

Delete a email via the id

Trying it out

You can install it by doing

docker push registry.gitlab.com/sorenmat/gosmtpd

docker start registry.gitlab.com/sorenmat/gosmtpd

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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