letterbox

command module
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

README

letterbox logo

letterbox

A privacy-focused, self-hostable email proxy and temporary email solution

Installation

To get a pre-compiled binary for your architecture, just head over to the releases page.

If you would like to compile it yourself:

go get gitlab.com/hackandsla.sh/letterbox

Usage

$ ./letterbox -h
letterbox helps do stuff

Usage:
  letterbox [flags]
  letterbox [command]

Available Commands:
  completion  Generate shell completions
  docs        Generate docs for this package
  help        Help about any command
  init        Initialize the initial admin user
  smtp-cli    Send a SMTP message

Flags:
      --cleanup-interval duration       The time between expired mailbox cleanup (default 1m0s)
      --config string                   config file
      --db-database string              Specify the database to use (default "letterbox")
      --db-host string                  Specify the database host to use
      --db-insecure                     If specified, will not use SSL to connect to the database
      --db-password string              Specify database password. ONLY USE THE ON THE CLI FOR TESTING
      --db-port int                     Specify the database port to use
      --db-user string                  Specify database user (default "letterbox")
      --development                     Enable development mode
  -h, --help                            help for letterbox
      --init-password string            The initial admin password. If specified, letterbox will attempt to create the initial admin account. Otherwise, an admin account will have to be specified manually.
      --init-username string            The initial admin username
      --jail-time duration              The amount of time an IP gets banned for (default 10m0s)
  -l, --log-file string                 File to log to
      --max-auth-attempts int           The allowed number of auth attempts before the IP is banned (default 10)
      --max-shutdown-seconds int        The max time (in seconds) to wait for the HTTP server to shut down (default 30)
  -p, --port int                        Port to run HTTP server on (default 8080)
      --smtp-hostname string            The hostname to use on the SMTP server
      --smtp-max-size string            The maximum email size to accept (default "10MB")
      --smtp-outbound-host string       The host to use to send proxied emails
      --smtp-outbound-password string   The password to authenticate to the outbound SMTP server with
      --smtp-outbound-port int          The port to use to send proxied emails (default 587)
      --smtp-outbound-username string   The username to authenticate to the outbound SMTP server with
      --smtp-port int                   Specify the SMTP port to use (default 587)
      --smtp-tls-cert string            The TLS certificate string to use
      --smtp-tls-certfile string        The TLS certificate file to use
      --smtp-tls-key string             The TLS key string to use
      --smtp-tls-keyfile string         The TLS key file to use
      --smtp-tls-port int               The port to use for the implicit TLS server (see RFC8314) (default 465)
  -v, --verbose                         Run with verbose logs

Use "letterbox [command] --help" for more information about a command.

Docker usage

To run the tool with Docker, just run the latest version of the hackandslash/letterbox image:

docker run \
    hackandslash/letterbox

Docker-Compose Usage

To run the server as simply as possible:

  1. Copy the contents of docker-compose-simple.yaml into a file called docker-compose.yaml.
  2. Change ${SECURE_PASSWORD} to a securely-generated random password
  3. Run docker-compose up -d

About Me

Trevor Taubitz – @terrabitz

Distributed under the AGPL license. See LICENSE for more information.

https://gitlab.com/terrabitz/

Documentation

Overview

Package Go web app template

The purpose of this application is to provide an opinionated base structure for other APIs

Terms Of Service:

there are no TOS at this moment, use at your own risk we take no responsibility

Schemes: http, https
Host: localhost
BasePath: /api/v1
Version: 0.0.1
License: MIT http://opensource.org/licenses/MIT
Contact: Trevor Taubitz<terrabitz@hackandsla.sh> https://hackandsla.sh

Consumes:
- application/json

Produces:
- application/json

Security:
- api_key:

SecurityDefinitions:
api_key:
     type: apiKey
     name: KEY
     in: header
oauth2:
    type: oauth2
    authorizationUrl: /oauth2/auth
    tokenUrl: /oauth2/token
    in: header
    scopes:
      bar: foo
    flow: accessCode

swagger:meta

Directories

Path Synopsis
internal
db
letterbox/letterboxfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
logger/loggerfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
smtpserver/parsemail
Vendored code from https://github.com/ArkaGPL/parsemail This code addresses some fixes missing from github.com/DusanKasan/parsemail.
Vendored code from https://github.com/ArkaGPL/parsemail This code addresses some fixes missing from github.com/DusanKasan/parsemail.
smtpserver/smtpserverfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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