So I've been using mailhog to catch my development emails for a few years.
But noticed that some of the inline images weren't rendered in the mailhog GUI and the mailhog docker image hadn't been updated for a few years
So I've switched to Mailpit which seems to have a few more niceties and shows me a list of potential client problems with the format of emails.
Mailpit Docker Image
https://hub.docker.com/r/axllent/mailpit
Mailpit Install on Ubuntu 24.04
I have an arm64 Ubuntu 24.04 VM running on VMWare Fusion on a Macbook Pro M1 which at the moment I believe VMWare Fusion doesn't support nested virtualization. Therefore you can also install mailpit as a standalone app and run it via systemd
Information at https://github.com/axllent/mailpit
Install on Ubuntu (not using the docker image) with the following command. It will install to /usr/local/bin/mailpit
sudo bash < <(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh)
Run it directly
mailpit --smtp 127.0.0.1:1025 --smtp-auth-allow-insecure --smtp-auth-accept-any
Access the user interface at http://localhost:8025
Run it using systemd
as a mailpit.service
Copy the below unit file contents to /etc/systemd/system/mailpit.service
Run sudo systemctl daemon-reload
to make sure systemd can see the new file
Enable the service with sudo systemctl enable mailpit.service
Star the service with sudo system start mailpit.service
It's a good idea to specify 127.0.0.1:1025. The default is 0.0.0.0:1025 (listen on all available interfaces) I typically only want it available from my development machine locally e.g. (localhost:1025)
# /etc/systemd/system/mailpit.service
[Unit]
Description=Mailpit server
[Service]
ExecStart=/usr/local/bin/mailpit --smtp 127.0.0.1:1025 --smtp-auth-allow-insecure --smtp-auth-accept-any -d /var/lib/mailpit/mailpit.db
Restart=always
# Restart service after 10 seconds service crashes
RestartSec=10
SyslogIdentifier=mailpit
# don't run as root but as a user of some sort
User=ja
Group=ja
[Install]
WantedBy=multi-user.target
0 Comments