Introducing MailCrab!

Marlon
Co-owner & Lead developer
Introducing MailCrab!
MailCrab is an email test server for development, written entirely in Rust.

"Did we really need a replacement for MailCatcher or MailHog?" I'm glad I asked. The answer is yes. See, a colleague had a hard time running Mailhog on his new Macbook, since there are no official docker builds for arm64. So partly to solve this issue, and partly because I simply wanted to write and maintain a small and handy program like Mailhog myself, the idea for MailCrab was born. The inspiration to write the whole thing in Rust came to me when I went to EuroRust in October 2022.

And here it is: better, smaller, faster.

MailCrab - mail test server in Rust

The advantages

  • As you might expect, there is a web interface that allows you to view all incoming email. You will see the formatted email by default, but the raw mail contents as well as the headers and file attachements can also be viewed in the same interface.

  • MailCrab runs on the amd64 and arm64 platforms using docker.

  • This docker image is tiny. It's only 7.77 MB.

  • It maintains an open websocket connection to the selected servers, meaning there is almost no latency.

  • There is a simple API to retrieve messages - which is handy for your automatic tests.

  • Install procedure is short and simple. Tiny program, tiny readme.

More cool stuff

  • The backend is entirely in Rust, and uses Axum;

  • The frontend is entirely in Rust, using Yew;

  • That means the whole thing is in Rust, and yes, that deserves its own bullet.

Try it out!

It is ready to use! So please do. In fact, please try it out:

docker run --rm -p 1080:1080 -p 1025:1025 marlonb/mailcrab:latest

and let me know if you have any feature requests!

Stay up-to-date

Stay up-to-date with our work and blog posts?

Related articles

The number of data centers worldwide is constantly increasing, and so is their electricity consumption. One way to become more power-efficient is certainly the constant development of better hardware, but we as developers should do our share. This post shows how coding in Rust can help to use existing resources more efficiently, to help preserve our planet — at least a little bit.
Asynchronous programming is pretty weird. While it is straightforward enough to understand in principle (write code that looks synchronous, but may be run concurrently yada yada yada), it is not so obvious how and when async functions actually perform work. This blog aims to shed light on how that works in Rust.
Just because we're engineers, doesn´t mean we build ALL our applications ourselves. But sometimes inspiration hits and good things happen. So our company planner is now canvas-rendered, has a Rust backend and works like a charm.