~janbaudisch/epistula

HTTP email sending service.
builds: use archlinux
initial commit

clone

read-only
https://git.sr.ht/~janbaudisch/epistula
read/write
git@git.sr.ht:~janbaudisch/epistula

You can also use your local clone with git send-email.

Build Status

#epistula

An HTTP server, that listenes for incoming requests to send an email via an SMTP server.

#Installation

#Preqrequisites

  • OpenSSL
  • Rust (when building from source)

#From Source

This project is built using cargo:

cargo build --release

The resulting binary will be at target/release/epistula

You might also want to install the example .env file, for example to /etc/epistula/epistula.env, as well as the Systemd service file epistula.service.

#Packages

I maintain a copr repo for Fedora and CentOS. To enable it and install the package run:

sudo dnf copr enable janbaudisch/epistula
sudo dnf install epistula

#Usage

See the manpage for epistula(1).

#Configuration

epistula is configured via environment variables. When run in debug mode, variables from the .env are merged with the environment.

Variable Default Description
LOGGING warn Debugging level for logger. One of trace, debug, info, warn or error.
HTTP_ADDRESS "127.0.0.1:8080" Address to listen on, in IP:PORT format.
UNIX_SOCKET none (UNIX only) socket (path) to listen on, if set will take precedence over HTTP (will not be enabled).
SMTP_HOST none SMTP host/domain to connect to for sending mails.
SMTP_PORT 465 SMTP port to connect to.
SMTP_TLS true Wether or not to use TLS for SMTP.
SMTP_USER none Username to use when authenticating with SMTP.
SMTP_PASSWORD none Password to use when authenticating with SMTP.
SMTP_TO none Mail address to send to.
SMTP_SUBJECT "New message" Subject line to use within mails.

See .env for an example configuration.

#Running

#Standalone

Make sure, your environment is setup correctly. Then run the server:

epistula
#Systemd

There is a Systemd service epistula.service provided. To enable it run:

systemctl enable epistula

The provided service file will take the environment variables from /etc/epistula/epistula.env.

#Issues

See the issue tracker.