Most active commenters
  • andix(3)

←back to thread

298 points mooreds | 49 comments | | HN request time: 0.814s | source | bottom
1. iruoy ◴[] No.42175560[source]
A tool like this is very useful, but this one isn't being maintained anymore. MailHog isn't either.

MailPit, MailCrab and smtp4dev are modern alternatives.

https://github.com/axllent/mailpit

https://github.com/tweedegolf/mailcrab

https://github.com/rnwood/smtp4dev

replies(17): >>42175787 #>>42175928 #>>42176115 #>>42176725 #>>42176926 #>>42177546 #>>42177804 #>>42178339 #>>42178590 #>>42178720 #>>42179230 #>>42180316 #>>42182891 #>>42183452 #>>42183958 #>>42184126 #>>42187070 #
2. masa331 ◴[] No.42175787[source]
I use Mailcatcher for almost ten years now and never had a problem with it. Maybe is doesn't need maintenance?
replies(3): >>42175991 #>>42176177 #>>42178723 #
3. olex ◴[] No.42175928[source]
Mailpit works amazingly for us. Thanks to it having a very simple API, we've been able to integrate it into Playwright e2e tests, and can easily verify things like complete new user registration and password reset flows in seconds. And the UI is handy for local dev work.
replies(1): >>42182525 #
4. gregoriol ◴[] No.42175991[source]
Same for Mailhog
5. Saris ◴[] No.42176115[source]
Does it need maintenance? It doesn't seem like much of a problem for working software that is local only.
replies(2): >>42176910 #>>42177607 #
6. iruoy ◴[] No.42176177[source]
There's no rush to move away from MailCatcher or MailHog, but if you're not using those solutions already I see no reason to use them over the maintained options.
replies(1): >>42178872 #
7. sigio ◴[] No.42176725[source]
Yup, can recommend mailpit, running a couple of instances here as well.
8. hoistbypetard ◴[] No.42176910[source]
It really only likely matters if you're one of those who is tempted to let it run on `0.0.0.0` instead of loopback only.

Assuming you're not, there's certainly no urgency to migrate. But keep it in the back of your mind that it's unmaintained, and if things go weirdly wrong during an OS or ruby upgrade, remember that you will need to fix it or pick up something else that's kind of similar.

If you're not already using it, it might be a good idea to pick up something else.

I like [mailpit](https://github.com/axllent/mailpit) because it's a single static binary and because it has a nice api I can use during testing to see if a message made it out of the system I'm testing.

But none of that argues for switching away from a thing that's working for you.

replies(1): >>42177346 #
9. yenoham ◴[] No.42176926[source]
Open-source is good for solo and small projects, but there are commercial solutions with continuous support, etc. and other features (e.g. SMS) like Mailosaur too

https://mailosaur.com/

10. nicoburns ◴[] No.42177346{3}[source]
This kind of product could also be useful in shared development environments (such as the sort that QA teams might have access to for example).
replies(1): >>42177634 #
11. andix ◴[] No.42177546[source]
Easy REST API access can be a quite useful feature too.

For automated integration testing it's a must. The test can verify in the end if the expected emails were sent out.

I think Mailpit can even be set up as a real SMTP server, handling a (sub) domain. Either as a MX or just via forwarding rules. Sometimes it can be useful to periodically run integration tests on a production system. So your tests could create accounts based on your test domain (random-user-name@testsystem.company.tld), which is deliverable from every email server, and the tests can verify the delivery. An automated script can then periodically delete the *@testsystem.company.tld accounts.

12. andix ◴[] No.42177607[source]
It depends. If it's not exposed to a network and doesn't have any awful bugs, than it should be fine.

Usually those mailtrap servers have some exposure to the company intranet or sometimes the internet, which could be problematic. Even test systems might receive sensitive data in the emails, that shouldn't be leaked to an attacker. An unmaintained software might have well known security issues.

13. andix ◴[] No.42177634{4}[source]
I've seen a few shared Mailpit installations in companies. I think that's a quite popular pattern.
14. crimsonnoodle58 ◴[] No.42177804[source]
Postal Server is a full featured docker based one that supports inbound and outbound email and has an API. Can be used for dev or production.

https://docs.postalserver.io/

15. dustedcodes ◴[] No.42178339[source]
I run https://msgdrop.io which is a commercial alternative with a great API and handy features.
16. Vendan ◴[] No.42178590[source]
The website is out of date, last release was actually in may (like smtp4dev) https://github.com/sj26/mailcatcher/releases/tag/v0.10.0
replies(1): >>42178939 #
17. Onavo ◴[] No.42178720[source]
What’s the easiest way to receive email programmatically without having to resort to a hosted service like SES? Is the SMTP protocol simple enough that it can be implemented in for example a serverless lambda?
replies(4): >>42179103 #>>42179588 #>>42179838 #>>42183360 #
18. Widdershin ◴[] No.42178723[source]
Try add it to the Gemfile of a modern Rails project, the dependencies are very out of date and it won’t install.
replies(3): >>42178796 #>>42178845 #>>42180445 #
19. snackernews ◴[] No.42178796{3}[source]
Docs say

> Please don't put mailcatcher into your Gemfile. It will conflict with your applications gems at some point.

replies(1): >>42187964 #
20. sj26 ◴[] No.42178845{3}[source]
It's not designed to go in your Gemfile

gem install mailcatcher

:-)

21. diggan ◴[] No.42178872{3}[source]
> I see no reason to use them over the maintained options

Things that don't change over a longer time period can be more comfortable sometimes. Especially things you use often and build up a sort of "muscle memory" about.

replies(1): >>42179572 #
22. sj26 ◴[] No.42178939[source]
Mea cupla. Fixed.
23. jedberg ◴[] No.42179103[source]
The protocol is quite simple to implement. The tricky part is triggering the lambda and then holding the connection open long enough to get the message.

You can’t trigger a lambda directly via tcp. You’d have to go through a gateway. That gateway would have to hold both sides of the connection open for a pretty long time.

It would be tricky but doable.

replies(1): >>42179387 #
24. valunord ◴[] No.42179230[source]
What usecases are you finding for this kind of a tool?
replies(1): >>42183945 #
25. Onavo ◴[] No.42179387{3}[source]
What about a fly.io container?
26. rnewme ◴[] No.42179572{4}[source]
You ignored first part of that sentence.
replies(1): >>42179684 #
27. aforwardslash ◴[] No.42179588[source]
The easy answer is to use an smtp server; many languages have stable packages to implement that. You can also use postfix with procmail or exim - leave the smtp stuff to tried and true packages, and have your code receive messages either via maildir or direct scripting.

The long answer is: first make sure you don't have a blacklisted IP; ask your cloud provider for permission to enable an MTA (mail transfer agent) and have fun seeing 99% of your email traffic being either brute force auth attempts or spam delivery attempts.

28. naniwaduni ◴[] No.42179684{5}[source]
"Not changing" has value in its own right.
replies(2): >>42179895 #>>42180483 #
29. kilroy123 ◴[] No.42179838[source]
For my site https://aichat.email this is how I do this:

SendGrid Inbound Parse --> node.js server --> back to user

30. fiddlerwoaroof ◴[] No.42179895{6}[source]
Yeah, people underestimate the value of “finished” software: in an ecosystem with lots of stable dependencies, there’s very little reason for useful software to change constantly.
replies(1): >>42180652 #
31. jallmann ◴[] No.42180316[source]
For those that don't want to run a SMTP server, I built Ephemeral Postal which offers a basic API for polling a mail box and retrieving messages, along with an in-browser UI. You get an entire subdomain to yourself that will take any address that you throw at it. https://ephemeralpostal.com
32. bdcravens ◴[] No.42180445{3}[source]
I always run Mailcatcher as a standalone Docker image (I'm already using Docker Compose for development), with no issues.
33. sureIy ◴[] No.42180483{6}[source]
Yes, you definitely don't want to risk closing up all those holes discovered in the last 10 years, lots of people might be left out of your servers.
34. picohik ◴[] No.42180652{7}[source]
Even "finished" software needs maintenance. Nothing is ever bug-free so needs fixes. And it doesn't live in a vacuum, the ecosystem evolves and continuous adjustments are needed when APIs evolve or libraries change.

In well-written software, the maintenance burden is low, but it's not zero. Without any maintenance, you can maybe run some piece of software in some closed-off container for a while, but it will keep rotting away and eventually you won't even be able to compile it anymore.

replies(3): >>42182501 #>>42182894 #>>42183279 #
35. diggan ◴[] No.42182501{8}[source]
> Even "finished" software needs maintenance.

What about "GNU Hello", never finished? Clearly this isn't true for 100% of all software, so the only thing we can conclude is that it either "depends" and/or is very subjective.

> when APIs evolve or libraries change.

If you live/work inside an ecosystem that favor stability over "evolving APIs", you can actually be able to use libraries that are decades old, that doesn't have any bugs for the stuff they expose and things just work. I mostly experience this in the Clojure ecosystem, but I'm sure it's true for other ecosystems too.

replies(2): >>42183830 #>>42191375 #
36. d_sc ◴[] No.42182525[source]
Any good guides on mailpit + playwright e2e working together?
37. account42 ◴[] No.42182891[source]
> this one isn't being maintained anymore

> Latest version: 0.10.0 (released Friday, 25th May 2024)

???

38. account42 ◴[] No.42182894{8}[source]
> Nothing is ever bug-free

Neither is the maintained modern software. If the bugs that there are don't affect you then you don't actually need the fixes.

39. naniwaduni ◴[] No.42183279{8}[source]
Does "small burst of activity and dependency updates twice a year" seem inadequate to you? That's the scale of maintenance that the project in question seems to exhibit, which is what we're apparently calling not maintained.
40. patja ◴[] No.42183360[source]
I didn't think SES received. It's just a sender.

I run postfix.

41. snthpy ◴[] No.42183452[source]
There's also Stalwart which I've been meaning to try out.

https://github.com/stalwartlabs/mail-server

42. e12e ◴[] No.42183830{9}[source]
>> What about "GNU Hello", never finished?

Most recently removing an outdated dependency?

> 2024-07-02 18:04:21 -0700 > maint: remove the obsolete gettext module

https://git.savannah.gnu.org/cgit/hello.git/commit/?id=24225...

43. apocalyptic0n3 ◴[] No.42183945[source]
If you're building a system that sends out emails, you generally can't send emails locally. So you instead use a service like MailCatcher/MailHog/MailPit/Mailtrap as an SMTP server that will "catch" the emails as they are sent. Then you just open that app up and you can see what emails were sent, what their content is, who they were sent to, etc. Some of these services also include email evaluation tools for things like identifying unsupported HTML/CSS, checking image/message sizes, headers, etc.

The other use case is when you're in a staging environment. You should generally seed such environments with fake email addresses but you can never be sure those emails are truly fake, and you can never be sure what email addresses your testers are using. So you set up MailPit and A) you never send a real person a fake email accidentally and B) all testers can see all emails.

44. dirkc ◴[] No.42183958[source]
I use https://github.com/maildev/maildev, they have a docker image that I run as part of my local dev setup
replies(1): >>42184300 #
45. izietto ◴[] No.42184126[source]
I see mailcatcher repo has fairly recent commits, what do you mean by "isn't being maintained anymore"?
46. tijn ◴[] No.42184300[source]
It seems like almost everyone has written an SMTP server; I use https://github.com/tijn/devmail which has no web interface but a POP server. This is by design so you can see your mail in an actual mail client like Apple's Mail.app or Thunderbird.
47. aidenn0 ◴[] No.42187070[source]
The maintainer says it's still being maintained: https://news.ycombinator.com/item?id=42178862
48. NewJazz ◴[] No.42187964{4}[source]
Commenter was just making the fair point that the dependencies are out of date.

Maintenance doesn't always mean UI redesigns or non-compatible config changes. Sometimes it is just fixing bugs and updating or replacing old dependencies.

49. picohik ◴[] No.42191375{9}[source]
> be able to use libraries that are decades old, that doesn't have any bugs for the stuff they expose and things just work.

Acknowledging that all software has bugs is the first step to be able to produce high quality.

> I mostly experience this in the Clojure ecosystem, but I'm sure it's true for other ecosystems too.

How many decades exactly has your clojure existed without any bugs?