Sign inSign up

paularlott/knot-mailpit

By paularlott

•Updated about 12 hours ago

Mailpit SMTP catcher wrapped with Knot entrypoint for agent integration, syslog and startup hooks.

Image
Developer tools
0

1.6K

paularlott/knot-mailpit repository overview

⁠knot-mailpit

A Mailpit⁠ image for knot⁠ spaces. It wraps the official axllent/mailpit Alpine image with the knot entrypoint, so a Mailpit instance running inside a space gets the same agent integration, rsyslog logging and startup hooks as every other knot base image. It is otherwise a standard Mailpit container.

Mailpit is an SMTP mail catcher for developers. It runs an SMTP server and a web UI for inspecting captured mail.

⁠Tags

All tags are multi-arch (linux/amd64, linux/arm64); see Docker Hub⁠ for the current list.

Each release is also tagged <version>-<BUILD_DATE>.

⁠Usage

docker run -d \
  -p 8025:8025 \
  -p 1025:1025 \
  -e KNOT_SERVER=https://knot.example.com \
  -v mailpit_data:/data \
  paularlott/knot-mailpit:1.30

Point your application at the SMTP server (from the host or another space) via knot port forwarding:

knot forward port 127.0.0.1:1025 <space> 1025

Open the web UI the same way — forward port 8025 and browse to it.

⁠How it works

The image layers the knot entrypoint on top of the official Mailpit image. On startup the entrypoint:

  1. Forces KNOT_USER to mailpit (a service user created at build time — the upstream image runs as root).
  2. If KNOT_SERVER is set, downloads and starts the knot agent (as mailpit).
  3. Starts rsyslog and forwards logs to the agent's syslog port.
  4. Runs scripts in /etc/knot-startup.d/ and ~/.knot-startup.d/.
  5. execs /mailpit as the mailpit user, piping its output to syslog so the agent captures it.
⁠Mailpit customizations
  • Service user — the upstream image ships no service user, so a mailpit user (home /home/mailpit) is created and Mailpit is run as it via gosu.
  • Persistent database — the default command sets --database /data/mailpit.db so captured mail survives restarts when /data is persisted.
  • Syslog logging — Mailpit logs to stdout; the entrypoint pipes that to rsyslog (tag mailpit) because Mailpit has no native syslog support and the knot agent collects logs over syslog.

⁠Environment variables

VariableDefaultDescription
KNOT_USERmailpitRuntime user (forced)
KNOT_SERVER(unset)knot server URL; if set, the agent is started
KNOT_AGENT_ENDPOINT(unset)Agent endpoint reported to the server
KNOT_SPACEID(unset)Space identifier
KNOT_SYSLOG_PORT1514Syslog forward target (0 disables forwarding)
TZEtc/UTCTimezone

Plus any Mailpit command-line flags passed via CMD (e.g. --smtp, --listen, --smtp-auth-accept-any). See mailpit --help.

⁠Exposed ports

PortProtocolPurpose
1025TCPSMTP server
8025TCPWeb UI & API
1110TCPPOP3 server (optional — requires --pop3-auth-file)

⁠Volumes

  • /data — Mailpit's database (mailpit.db); persist this across restarts to keep captured mail.

⁠License

Mailpit is MIT⁠. This image's packaging — the Dockerfile, knot-entrypoint and supporting scripts/configs — is Apache License 2.0⁠.

Source: paularlott/knot-base-images⁠.

Tag summary

Content type

Image

Digest

sha256:23e717595…

Size

19.1 MB

Last updated

about 12 hours ago

docker pull paularlott/knot-mailpit:1.30-20260929