Live data from Hacker News

Show HN: Posthorn, self-hosted mail gateway

github.com

11–20 of 68 posts

Re: Show HN: Posthorn, self-hosted mail gateway

#11

An interesting combination of features. Personally, I have used nullmailer in the past to provide a sendmail compatible local install that immediately forwards email to the SMTP server of my choice. Has worked flawlessly. Obviously, that doesn't come with HTML form support, but then I am also not sure I would like the same binary to handle both a HTTP(S) endpoint and email submission :)

Nullmailer's a good call for a single-app use case. It's basically what I was doing.

Posthorn ended up the way it did because I had three different things all hitting Resend at the same time: a contact form, a couple of apps that only had SMTP email support and some scripts I wanted to email results from. I didn't want to have to maintain three different things doing functionally the same routing. Putting them in one binary helped me consolidate credentials and logs.

You're not wrong about the split though, I thought about breaking the two out. I'd originally written the http form handler as a caddy module (which I called caddy-formward to be cute) but ultimately I went the other way because the code after the ingress is the same regardless of how you come into the service and I didn't want to rewrite all that logic.

Have you encountered a similar issue with multiple apps where nullmailer hasn't been enough? Curious how you handled it if so.

Re: Show HN: Posthorn, self-hosted mail gateway

#12
I really want to try this, but I'm afraid my DNS will be blacklisted if I do. Can someone guide me and others, if this is the case? E-Mail is the most complex of everything I know in sysadmin/DNS/Server stuff.

My current provider since almost two decades without any issues, except speed and storage limitations is all-inkl.com, but I really just use it for email and nothing else, therefore most likely overpriced at ~6€/month.

I would love to switch to some VPS/root or anything where I can SSH and install, compile my own services, but something where security is high and support is 24/7 available.

Re: Show HN: Posthorn, self-hosted mail gateway

#15
> Nobody wants to run a mail server in 2026.

We do, and thats why we use Postal [1].

The more SaaS applications that self-host email the better. It forces the big guys, ie Microsoft, to improve their blocklists and not lazily block entire ranges. Yes its work contacting them occasionally, but it keeps the internet open. The alternative is an internet where they control it all.

1. https://docs.postalserver.io/

Re: Show HN: Posthorn, self-hosted mail gateway

#16

I really want to try this, but I'm afraid my DNS will be blacklisted if I do. Can someone guide me and others, if this is the case? E-Mail is the most complex of everything I know in sysadmin/DNS/Server stuff. My current provider since almost two decades without any issues, except speed and storage limitations is all-inkl.com, but I really just use it for email and nothing else, therefore most likely overpriced at ~6…

Two things to unpack here:

1) Posthorn doesn't host email - no inbox, no IMAP so it doesn't replace what it sounds like all-inkl is doing for you. All it does is take the outgoing messages from any of your hosted/local apps and take care of the plumbing of handing them off to a transactional provider (like Resend or Postmark). Those servers are the ones sending the mail, using their IPs and their sending reputation. Any blacklist concern is really tied to your sending domain and not a new risk from Posthorn. Just the same setup you'd do if you were calling something like Resend directly. If you're following their guidelines, you'll be fine.

2) On the VPS side, if your goal is to be able to ssh in, install some stuff and run your own services, something like Hetzner is a well regarded EU centric option with solid technical support baked in. Security is mostly on you and down to what you install and how you configure it. That can be a huge learning curve and a whole other kettle of fish, definitely not without risk.

Re: Show HN: Posthorn, self-hosted mail gateway

#17

> Nobody wants to run a mail server in 2026. We do, and thats why we use Postal [1]. The more SaaS applications that self-host email the better. It forces the big guys, ie Microsoft, to improve their blocklists and not lazily block entire ranges. Yes its work contacting them occasionally, but it keeps the internet open. The alternative is an internet where they control it all. 1. https://docs.postalserver.io/

Fair. Don't disagree with anything you're saying here.

I should probably tighten up that line. What I really meant to say is that the average self-hoster who just wants to enable a few services to send email doesn't want to run a mail server. Different audiences, different (and both correct) answers.

I set out to solve some pretty specific problems of my own but I'm genuinely curious how others have tackled these things. Posthorn and Postal don't compete in my head. Postal makes you into your own provider, which is something I personally deeply want to avoid. Posthorn assumes you've already picked a provider (which might be Postal, actually, it would work just fine pointed at a self-hosted Postal instance).

Re: Show HN: Posthorn, self-hosted mail gateway

#18

> Nobody wants to self host email server. I do. Though I am self hosting it to have my personal email, being well... personal. Not for my company so maybe I am not the target. Interesting project though. I always felt missing API to just send emails from some script in my mail server.

Personal mail is the one case I think where hosting your own MTA still makes sense when you want to own the addresses and the data. You still have to solve for deliverability, which is something I hope to never have to do. Posthorn is built for the opposite end of that, you've already decided you want to use a transactional provider for app mail and you just want to stop having to deal with wiring it into all of the…

> […]You still have to solve for deliverability, which is something I hope to never have to do. […]

This is the exact case where I'd be really afraid of running it on my own and this I VERY STRONGLY BELIEVE should NOT be the case. Participating in email should be easy.

Re: Show HN: Posthorn, self-hosted mail gateway

#19
post #14

Nice project, nice initial subset of options. At work I'm using Apprise ( https://appriseit.com/ ) to deliver notifications. Are you planning to add more services or to limit Posthorn to emails?

Haven't used Apprise, but it looks interesting!

My current plans are for Posthorn to stay focused on email. There's enough work here that I think it justifies a dedicated tool.

I have some v2 roadmap ideas for things like multiple outputs per endpoint so that a contact form submission can fire both an email and a webhook in the same call to support things like form -> email + slack or script triggers an email + pager duty alert.

That's complimentary to the email though, not something I had planned to build out as a stand alone use case. I'd be interested in hearing how that would be useful for you though!

Post reply on HN