Sign inSign up

jivanyatra/maildump

By jivanyatra

•Updated 12 months ago

Minimal images from alpine for ThiefMaster/maildump - an smtp server that catches test emails

Image
Developer tools
1

10K+

jivanyatra/maildump repository overview

This is a docker image for maildump by ThiefMaster⁠, which is a python implementation of Samuel Cochran's MailCatcher⁠. I had nothing to do with the actual software, I just built the docker images⁠. All credit to the respective authors of these great tools!

It's a great piece of kit that launches an SMTP server that "catches" outgoing emails - ideal for testing functionality. It also has an web interface running on a different port so you can view the caught emails.

ThiefMaster's implementation has the ability to save the emails to a database, which you can specify in the docker-compose.yml file optionally. His version also has support for .htaccess password files but I've excluded that functionality for two reasons:

  • If you're using this for local testing via a docker compose or kubernetes, you probably don't need to password protect it.
  • If you're using this on a test server (or using it in a homelab), you're probably running NGINX to proxy containers anyway, and you can just implement the .htaccess support there.
  • I might decide to add it later, if there's any interest.

This might be ideal for homelabbers who want to catch outgoing emails from services - say, invites to a password manager that might be a mandatory part of the flow - without creating and using a burner email or their real email. This is what I used it for, then started to incorporate this into my standard test flows.

I've build this off of the very lean alpine python base image.

Below is a sample docker-compose.yml file, as well as how to initialize an empty sqlite3 db for you homelabbers.

version: '3.9'

services:
  maildump:
    image: jivanyatra/maildump:latest
    container_name: "maildump"
    environment:
      # If you only want the emails in memory, comment out this section
      - DBFILE=1
    volumes:
      # If you only want the emails in memory, comment out this section
      - /path/to/MailDump/temp.db:/data/maildump.db
    ports:
      - 1025:1025 # smtp port
      - 8087:1080 # web interface port

To initialize an empty sqlite db, just do sqlite3 maildump.db "VACUUM;"

TO DO:

  • Figure out how to build dependencies for arm64 and then remove them for a light image linux/arm64 image is available for Raspberry Pis (if a MacOS user needs this reach out and we can put something together)
  • create a GitHub repo for the Docker files for now, in case ThiefMaster responds and doesn't want a PR GitHub Repo⁠

⁠New "testing" Images

maildump:1.2-testing from this repo is a new image that's being tested. I made some changes in the replacing_smtpd_with_aiosmtp branch⁠ in my fork, trying to replace the deprecated smtpd library. It's still very much a work in progress.

From this point forward, I will probably maintain 4 images:

  • maildump:version (based on bookworm)
  • maildump:version-alpine (based on alpine, of course)

Both of these for x86_64 and arm64. Currently the alpine images are stupidly slow to load the application. Not sure why, just yet. I'm also hoping to bump basic js deps and maybe add some functionality. Let's see how it goes.

Dockerfiles can be found in their own repo⁠

Tag summary

Content type

Image

Digest

sha256:5ecdf51fb…

Size

47.8 MB

Last updated

almost 3 years ago

docker pull jivanyatra/maildump