Hacker News new | ask | show | jobs
by haroldp 3367 days ago
On my laptop, where I do all of my development work, I just configured Postfix to send everything to plain files:

http://harold.internal.org/configuring-a-dev-box-mail-server...

I like this a lot better than sending stuff out across the network.

3 comments

https://github.com/mailhog/MailHog looks like a really nice alternative, where you can also test HTML mail, etc.

Personally, my local SMTP actually sends email, because I DO want legitimate email (mutt, cron) though, so I'd be scared to mix up two local smtp instances.

MailHog is pretty great. In response to your concern, by default it runs on a non-standard port, so you need to configure your apps to point at it (port 1025 by default). Even then, you can configure it to act as a MITM, where the webmail interface lets you "release" messages you actually want to send out: https://github.com/mailhog/MailHog/blob/master/docs/CONFIG.m...
Mailcatcher is an even simpler solution (assuming you can install rubygems): https://mailcatcher.me/
Mailcatcher is available as a Docker container, so you don't even necessarily have to set up Rubygems yourself: https://hub.docker.com/r/schickling/mailcatcher/
I recently ported a small combined SMTP/POP3-server (from Ruby to Crystal) so I can read the mail from my projects in Thunderbird or the OS X Mail app. Yes, this is another shameless plug, but I hope it's useful: https://github.com/tijn/devmail