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

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.
Most of our web applications use either Node.js or Symfony for their server-side part. Both offer a lot in terms of productivity. But every now and again, when you look at the computing power used or the amount of time a simple HTTP request takes, you can't help to think "what if..?".
CI/CD (continuous integration/continous deployment) is a proces where developers integrate new code into the main branch in regular intervals (preferably several times per day). Using CI/CD allows us to get up to a quick iteration pace and gives us a way to gather feedback quickly.