11 comments

  • crimsonnoodle581 hour ago
    &gt; Nobody wants to run a mail server in 2026.<p>We do, and thats why we use Postal [1].<p>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.<p>1. <a href="https:&#x2F;&#x2F;docs.postalserver.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.postalserver.io&#x2F;</a>
    • craigmccaskill56 minutes ago
      Fair. Don&#x27;t disagree with anything you&#x27;re saying here.<p>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&#x27;t want to run a mail server. Different audiences, different (and both correct) answers.<p>I set out to solve some pretty specific problems of my own but I&#x27;m genuinely curious how others have tackled these things. Posthorn and Postal don&#x27;t compete in my head. Postal makes you into your own provider, which is something I personally deeply want to avoid. Posthorn assumes you&#x27;ve already picked a provider (which might be Postal, actually, it would work just fine pointed at a self-hosted Postal instance).
      • embedding-shape16 minutes ago
        &gt; the average self-hoster who just wants to enable a few services to send email doesn&#x27;t want to run a mail server<p>Maybe I&#x27;m confused, maybe the label &quot;self-hoster&quot; is broader than the definition in my mind, but that&#x27;s exactly what self-hosters want to do, that&#x27;s why we call ourselves self-hosters, we want to host the stuff we use ourselves :)<p>If I just wanted to &quot;enable a few services&quot; I&#x27;d use AWS or whatever the modern alternatives are.
        • craigmccaskill6 minutes ago
          &gt; If I just wanted to enable a few services I&#x27;d use AWS or whatever<p>But then you&#x27;d be using AWS for those services too.<p>I think there&#x27;s a meaningful gap between folks who are willing and able to self host their own applications but have decided that running their own MTA is a separate and much harder commitment. Different line, but still self-hosting in any reasonable read of the term. I&#x27;ve been on both sides of that line at one point, I&#x27;m trying to avoid going back. :)
  • cuu50835 minutes ago
    Confusing title, &quot;self-hosted mail&quot; and &quot;self-hosted email gateway&quot; are two quite different things :-&#x2F;
    • craigmccaskill18 minutes ago
      Fair. I was trying to convey self hosted benefits without the downside of hosting your own MTA. I was also really in my head on the niche and assumed everyone else would get it from the snappy title. Not my intent to mislead.
  • peter_retief30 minutes ago
    I am running a local mail server using cloudflared tunnels and brevo for sending<p>postfix&#x2F;sendmail&#x2F;dovecot&#x2F;ingress setup<p>I am really happy with the setup. (So far)
    • craigmccaskill12 minutes ago
      Nice. Sounds like a neat way to get the best of all worlds. Self hosted email without exposing your IP, leverage a third party with an existing trusted send reputation but still maintain full ownership of the stack.<p>How much effort has it been to keep it running? Glad that it works for you!
  • ALLTaken1 hour ago
    I really want to try this, but I&#x27;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&#x2F;DNS&#x2F;Server stuff.<p>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€&#x2F;month.<p>I would love to switch to some VPS&#x2F;root or anything where I can SSH and install, compile my own services, but something where security is high and support is 24&#x2F;7 available.
    • craigmccaskill1 hour ago
      Two things to unpack here:<p>1) Posthorn doesn&#x27;t host email - no inbox, no IMAP so it doesn&#x27;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&#x2F;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&#x27;d do if you were calling something like Resend directly. If you&#x27;re following their guidelines, you&#x27;ll be fine.<p>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.
    • graemep28 minutes ago
      A VPS will not be cheaper - but you may get more for your money (more storage, unlimited accounts).<p>For something simple try <a href="https:&#x2F;&#x2F;mailinabox.email&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mailinabox.email&#x2F;</a><p>&gt; would love to switch to some VPS&#x2F;root or anything where I can SSH and install, compile my own services, but something where security is high and support is 24&#x2F;7 available.<p>Those sound like expensive requirements to me. You want managed self hosted email? Some else providing support will be expensive.
  • graemep26 minutes ago
    The title is inaccurate. Its a self-hosted transactional email gateway, not self hosted email
  • radiospiel2 hours ago
    An interesting combination of features.<p>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.<p>Obviously, that doesn&#x27;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 :)
    • craigmccaskill1 hour ago
      Nullmailer&#x27;s a good call for a single-app use case. It&#x27;s basically what I was doing.<p>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&#x27;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.<p>You&#x27;re not wrong about the split though, I thought about breaking the two out. I&#x27;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&#x27;t want to rewrite all that logic.<p>Have you encountered a similar issue with multiple apps where nullmailer hasn&#x27;t been enough? Curious how you handled it if so.
  • basemi1 hour ago
    Nice project, nice initial subset of options.<p>At work I&#x27;m using Apprise (<a href="https:&#x2F;&#x2F;appriseit.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;appriseit.com&#x2F;</a>) to deliver notifications.<p>Are you planning to add more services or to limit Posthorn to emails?
    • craigmccaskill43 minutes ago
      Haven&#x27;t used Apprise, but it looks interesting!<p>My current plans are for Posthorn to stay focused on email. There&#x27;s enough work here that I think it justifies a dedicated tool.<p>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 -&gt; email + slack or script triggers an email + pager duty alert.<p>That&#x27;s complimentary to the email though, not something I had planned to build out as a stand alone use case. I&#x27;d be interested in hearing how that would be useful for you though!
      • basemi26 minutes ago
        We&#x27;ve chosen Apprise just for the big number of services supported, actually at the moment we only use email and telegram as notification output channels.<p>Apprise does not accept SMTP protocol as input, so you&#x27;re bound exclusively to API, binary exec or third party integrations.<p>I think Posthorn could fill a gap if it will integrate the possibility to send a webhook (alongside&#x2F;instead of email).
  • npodbielski2 hours ago
    &gt; Nobody wants to self host email server.<p>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.<p>Interesting project though. I always felt missing API to just send emails from some script in my mail server.
    • craigmccaskill2 hours ago
      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.<p>Posthorn is built for the opposite end of that, you&#x27;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 things. Obviously for a big production app you build your own mail service, but for gluing together a bunch of different apps you&#x27;re self hosting, I think this makes sense and addresses a real issue.<p>If you want an API piece to augment what you already have, Posthorn might still be useful regardless of how the rest of your mail is set up. A Posthorn JSON endpoint is just a POST with Bearer auth and an idempotency key. Example from my docs:<p>curl -X POST <a href="https:&#x2F;&#x2F;posthorn.yourdomain.com&#x2F;api&#x2F;transactional" rel="nofollow">https:&#x2F;&#x2F;posthorn.yourdomain.com&#x2F;api&#x2F;transactional</a> \ -H &quot;Authorization: Bearer $WORKER_KEY_PRIMARY&quot; \ -H &quot;Content-Type: application&#x2F;json&quot; \ -H &quot;Idempotency-Key: reset:user-123:$(date -u +%FT%H)&quot; \ --data &#x27;{ &quot;to_override&quot;: &quot;bob@example.com&quot;, &quot;subject_line&quot;: &quot;Reset your password&quot;, &quot;message&quot;: &quot;Click here: <a href="https:&#x2F;&#x2F;app.example.com&#x2F;reset&#x2F;abc" rel="nofollow">https:&#x2F;&#x2F;app.example.com&#x2F;reset&#x2F;abc</a>&quot; }&#x27;<p>Could run alongside your existing mail server. It&#x27;s a small enough overhead that the juice might be worth the squeeze.
      • ALLTaken56 minutes ago
        &gt; […]You still have to solve for deliverability, which is something I hope to never have to do. […]<p>This is the exact case where I&#x27;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.
  • throwaway815232 hours ago
    Is Posthorn a reference to W.A.S.T.E.?
    • craigmccaskill2 hours ago
      Not intentionally, but TIL that this turned into an apt reference. The pynchon connection is excellent.<p>My (intentional) reference was to the older mail courier horn.
    • 472828472 hours ago
      Not OP but I read it as reference to just <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Post_horn" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Post_horn</a>
  • ranger_danger2 hours ago
    Don&#x27;t services like SES already operate over 443&#x2F;TLS and aren&#x27;t blocked?
    • craigmccaskill1 hour ago
      Correct, but not all apps can talk directly to an HTTPS API. Ghost, Gitea, Mastodon, NextCloud, Authentik, Matrix to name a few all only have built in SMTP support. Posthorn listens for that connection from those apps locally and translates it into whatever your transactional mail provider needs.<p>If all the apps you&#x27;re running can already integrate via HTTPS API, Posthorn doesn&#x27;t solve anything for you in that case, unless the unified credential, single retry policy and logging meaningfully simplifies things for you.<p>And honestly, SES was the easiest integration for me to write (even if it ended up being the most LOC), their documentation, examples and error responses gave me a really easy time setting it up. Additionally, because it does need such a verbose implementation SES ends up being a great case study for Posthorn and not needing to maintain the same 200 line signing routine in multiple different places.
  • nine_ch1 hour ago
    [flagged]