top | item 14201562

Postal: Open source mail delivery platform, alternative to Mailgun or Sendgrid

715 points| rendx | 9 years ago |github.com

182 comments

order
[+] jitbit|9 years ago|reply
Great discussion here, not necessarily about the OP's link, but still learned a lot. Would love to contribute my 2 cents...

Our app[1] sends/receives several million emails per month. Not an exaggeration, it's actually seven figures.

Meaning it's more than 100k a day. Meaning it's 5-6 emails every friggin second. On average. It, of course, peaks during US daytime, up to 30 per second.

We tried a looooh-ot of solutions (all priced at THOUSANDS a month at this volume) including Mailgun, Sendgrid, SES etc, but finally settled to a tiny Ubuntu micro-instance on EC2, running Postfix. It has 1 gb of memory, costs us $4 a month and the CPU load rarely goes higher than 4%.

Of course you would need to get yourself familiar with SMTP, postfix, SPF/DKIM, mx-validation, blacklists etc. And by "familiar" I mean "learn it tothe core" :))

Another thing - you need to build-up reputation for your IP, cause email providers like outlook/gmail/yahoo will simply reject your emails if you start sending a LOT out of the blue. You have to build it up gradually, takes months to get there. Makes it a huge PITA when you need to change your IP :((

PS. If you need incoming email to call some external REST-api - postfix can launch a local php-script that does that. Not sexy but - $4 a month, right.

[1] https://www.jitbit.com/hosted-helpdesk/

[+] movedx|9 years ago|reply
Hey,

So firstly, I don't work for AWS or Amazon, or any Cloud provider. Just wanted to make sure that was clear.

After reading your very interesting comment I thought I'd do some maths on the costs SES should be charging you. Essentially at $0.10 per 1,000 messages, and sending "several million" or "seven figures" worth of messages per month, so a possible total of 9,999,999, you should be paying almost exactly $1,000 for that. That's not really "THOUSANDS", but it is substantially more than $4 haha :)

If you're sending 5,000,000, then the figured drops to $500/month.

Anyway your $4/month server is a very cool concept. Would you be willing to share the configuration? Perhaps you've written an Ansible Playbook to provision it for you?

EDIT: So essentially my point is this: it's not that expensive, compared to compute resources to actually run your application, to have someone else manage all of that for you.

[+] ams6110|9 years ago|reply
you would need to get yourself familiar with SMTP, postfix, SPF/DKIM, mx-validation, blacklists etc. And by "familiar" I mean "learn it tothe core"

Why? Wouldn't the "proper" or "best" way of configuring all these things be pretty much the same for everyone? Why could this just not be a receipe: do all these things, in this order, etc.

[+] azca|9 years ago|reply
This is what I would do as well. Coming from a hosted mail solution (one of the earliest in the Industry as part a of the initial Dotcom bubble) that cost 10000x5+thensome as much to run, albeit with higher send rates and clusters, It totally makes sense to use ec2 for these needs today.
[+] hippich|9 years ago|reply
while it will not give your such configuration precision, i highly recommend to checkout sovereign project - https://github.com/sovereign/sovereign

In the beginning I used to setup just personal "cloud", but now actually using it to send emails for other businesses I run.

In theory it should be possible to run these playbooks without all extras and just keep bare minimum to send emails (never tried it, so not sure what it will take)

Sovereign will configure postfix + dkim + spf + blacklists for you. Plus provides your imap mailboxes to receive bounces and regular mail.

[+] nodesocket|9 years ago|reply
How about redundancy when your $4 a month VM goes down? If you're sending/receiving that much e-mail, I assume uptime is critically important.
[+] dan1234|9 years ago|reply
Isn’t part of the reason for using Mailgun, Sendgrid etc that you get to send via IP addresses with good reputation?
[+] cnagele|9 years ago|reply
This is a big reason for sure. As you can see in this post, those IP addresses can be hit or miss depending on the provider. At Postmark, we don't really believe in dedicated IPs for all customers. We think that our customer base should not include any bad actors, and instead manually approve every customer to ensure our entire CIDR ranges are clean. The benefit is not just clean IPs, but clean IPs that have an incredible transactional-only reputation with the ISPs. This is how we are able to delivery so fast to the inbox. We only really believe in dedicated IPs for higher volume senders, especially since reputation is moving toward the domain more and more. I wrote about this six years ago, and it is even more true today (https://postmarkapp.com/blog/the-false-promises-of-dedicated...).

At the same time, if you are willing to install and manage Postal on your own servers, it's not that hard to maintain your own IP with a great reputation. You just need a good hosting provider (probably not AWS), you need to set up your infrastructure like DKIM, SPF, DMARC, rDNS, and Return Paths, and most importantly you need to maintain good engagement (low bounces, high opens). At a glance, Postal looks like a nice option if you want to do it on your own for cheap. You just might lack the stability, support, maintenance, and performance that goes behind an ESP.

[+] jwr|9 years ago|reply
I tried using Sendgrid and was surprised to find out that unless you buy an expensive plan, then:

* You get IPs from a shared pool, and the reputation is nowhere near guaranteed. In fact, many of my mails were blackholed or rejected.

* The "bad" IPs that were used by someone for spamming are not immediately removed from the pool, so you will encounter them.

The net result for me was that Sendgrid is not a solution for my transactional E-mail, because of the high risk of my E-mails getting blackholed/rejected. I use it for newsletters/marketing only.

[+] richardkeller|9 years ago|reply
Unfortunately, unless you're paying for a dedicated IP address with Mailgun, their sender reputation is mostly quite bad. We are constantly having to request our account to be moved to a new IP due to them landing up in some blacklist.
[+] grenoire|9 years ago|reply
Exactly. These services do not get blocked by spam filters due to their credibility scores. That is the most important feature, not the UX.
[+] oblib|9 years ago|reply
I took a look at the github project and I hope they do great.

As a side project I've been working on setting up my own mail server using "Mail-in-a-Box" (https://mailinabox.email) for about a month now.

It's been a learning process but I do like the idea of having control over this. I've got it set up to send emails from a remote app server using a perl script and an email account configured on my Mac Mail app all working.

Mail-in-a-Box is really pretty sweet. It walks you through the install and has a very nice Control Panel that handles DNS and user account setup and it comes with the Roundcube email web client and ownCloud.

There are hurdles. I got a clean IP from DigitalOcean with no problem, but the domain name I'm using is new and has no reputation so when I tested it last week sending emails from the app server to my personal Gmail account the Gmail server responded saying:

"Our system has detected that this message is 421-4.7.0 suspicious due to the very low reputation of the sending IP address. 421-4.7.0 To protect our users from spam, mail sent from your IP address has 421-4.7.0 been temporarily rate limited."

I only sent about a dozen emails, all to my own Gmail account, so that seems to be a bit harsh.

Then it occurred to me why Gmail exists and it made a lot more sense. So, there are hurdles.

[+] ksajadi|9 years ago|reply
We sent a lot of emails which makes services like Postmark or Mandrill very expensive. Since switching to Amazon SES, the cost has been much lower but the lack of individual email tracking has been a pain (in case a recipient claims they haven't received it or we need to track opens, etc).

This UI with an Amazon SES backend would be ideal.

[+] dan1234|9 years ago|reply
If you’re sending newsletters, you might want to look at Sendy[1] (no affiliation), which sends via SES.

1 https://sendy.co

[+] jonathanbull|9 years ago|reply
I co-founded https://emailoctopus.com which might be what you're looking for - we're an AWS partner offering marketing features (list management, open tracking, etc.) on top of SES.
[+] brightball|9 years ago|reply
You could also try something like Sendwithus hooked up to your SES account. They provide a consistent template, delivery and customer support interface for email that integrates with a lot of different providers.

It's a nice layer who's pricing works if you're sending a lot of emails to the same people over and over again. The entire setup (pricing and interface) is build around individuals sent to and not total email volume.

[+] tpetry|9 years ago|reply
If you want to track opens and some more metrics independent of your mailing solution you should try mailspice.com

(Disclaimer: Developer of mailspice)

[+] icebraining|9 years ago|reply
Since it uses SMTP anyway, shouldn't be too hard to allow it to use SES as a smart host.
[+] slig|9 years ago|reply
If you want to send newsletters, try Mailwizz.

Be careful with some of the alternatives and be sure to read their source code with an empty stomach.

[+] vanilla|9 years ago|reply
This seems to be the software behind appmail.io[1], a service just like mailgun and sendgrid.

[1]: https://appmail.io/

[+] rayboy1995|9 years ago|reply
From the repo:

> Postal was developed by aTech Media to serve its own mail processing requirements and we have since decided that it should be released as an open source project for the community. It was originally launched by us as AppMail but renamed to Postal as part of making it open source as we felt the name was more suitable.

[+] nbevans|9 years ago|reply
The reason why we use Mailgun is to avoid deploying and maintaining e-mail infrastructure which is very hard and high cost. We would rather keep paying Mailgun about $20/mo as this is cheaper by several magnitudes than the self-hosting option.
[+] itburnslikeice|9 years ago|reply
> 20/mo as this is cheaper by several magnitudes than the self-hosting option.

exactly this, even the cheapest cloud instances cost around 100$/m, while some might be 20$/m it's just not worth the effort to host your own because it also needs management/maintenance if you do which translates in to hours of work. Yes you can automate these things but it simply not worth it when the only thing you want to do is sent mass emails, without even caring about anything besides configuration to connect to XYZ service.

[+] pvsukale3|9 years ago|reply
Will this platform be actually usable for independent developers considering today's spam blocking scenario. How one should proceed with this in order to not get blacklisted while actually using it for the first time.
[+] Mahn|9 years ago|reply
It's an interface, it doesn't take care of email reputation for you. This is for people who want to DIY to have a pretty dashboard on top, but you're on your own for email deliverability.
[+] stephenr|9 years ago|reply
This sort of thing is fantastic to see, regardless of whether you want to run your own mail servers for this task.

That they provide a hosted service using the same stack is great to see: host it yourself, or pay them to host it for you. This is what great open source businesses can look like.

No "open core" where the good stuff isn't available for the community, and community efforts to implement the same thing get rejected.

No viral licensing like the GPL or jesus shit on a stick, the AGPL.

[+] simonhamp|9 years ago|reply
Completely agree with this, my only concern is that an open-source solution increases the likelihood of spam-ridden senders popping up more frequently and becoming harder to shut-down as they can spin up instances more easily and get going from a new location more quickly.

There is actually some benefit to be had by the process of setting up a mailing service being a little trickier.

From a business perspective, it's also a great decision, as it shows customers who outgrow (or are in fear of outgrowing) your SaaS have a first-party path to scale.

And you could still make money off those customers if you can offer a strong support/hosting solution.

It's a massive win. As an aTech customer with some of their other products in the past, I'm really pleased to see this and I wish them all the best!

Also, proud to support fellow Brit tech companies ;)

[+] cyphar|9 years ago|reply
> No viral licensing like the GPL or jesus shit on a stick, the AGPL.

This GPL hatred is completely orthogonal to your point. In fact, GPL/AGPL ensures that other services won't turn your lovely free software project into an open core product. See ShareLatex for a similar free software business and project that uses the AGPL and appears to be working just fine.

[+] smichel17|9 years ago|reply
That's some pretty strong hate for the GPL without reasoning to back it up. As a fan of the GPL/AGPL, care to elaborate?
[+] soperj|9 years ago|reply
The reason that Linux is what it is today is the GPL. Otherwise it would be just like BSD, and bundled into the OS for worst of the worst for propriety shit, Apple.
[+] pratik60|9 years ago|reply
The business model is very similar to Sentry. Loving it though , don't know how the internal finances team approve such changes, but wow!
[+] cryptarch|9 years ago|reply
Do you have a system to prevent trusted users from being given low-reputation ip addresses without them having to pay for a dedicated ip?

Something like, "if you don't pay for a dedicated ip, but have been a non-spamming client for a month, we move you to a higher-rep ip address pool"?

[+] senic|9 years ago|reply
Interesting, I was just looking for something like this the other day, thanks HN! The software looks quite polished. Hopefully there'll be a dockerzied version to play with it.
[+] WA|9 years ago|reply
Awesome, I've been waiting for this, because I don't believe in the "delivery" promise of big brand mail providers. Most newsletters* go to spam, no matter if they're via Mailchimp, Aweber or transactional mail providers.

Maybe the big names work better with Gmail, since Gmail has quite an aggressive spam filtering. But neither I, nor most of my customers (Germans) use Gmail, so I don't care.

Edit: *most newsletters I receive

[+] brightball|9 years ago|reply
I'm most interested to see what their solution for handling INCOMING email looks like. Having used the inbound APIs with the others they are all pretty polished and reliable but have inconsistent APIs. I've always been a little bit concerned about how to handle high volumes of inbound email functionality if the prices on those services ever went up.
[+] jbverschoor|9 years ago|reply
I'm a big fan of mailgun. It is far better than mandril, sendgrid and probably ses - without a lot of the set up
[+] ohstopitu|9 years ago|reply
If I were to host this myself, I'd still need a static IP that had a good reputation. GCP and Azure both mention that we should not be hosting mail servers on their platforms (rather, they all suggest we setup mail servers + relays to a reputed IP).

How would I go about getting a static IP or a reputed IP?

[+] stephenr|9 years ago|reply
Companies have been renting/leasing servers for a long time before Amazon and Google got into that business.
[+] theprop|9 years ago|reply
Is this more than an SMTP server? Those are services designed to send emails as an API service for many different parties. Is that what "Postal" is? Or is it a another SMTP server like Postflix or something? It's not at all clear from your description...
[+] spuz|9 years ago|reply
Does Postal allow you to set up an email group? I.e. an email address that will forward to a defined list of other email addresses any email that is sent to it? This is a feature of Mailgun but unfortunately it does not quite behave in the way we need with regards to setting the 'Reply-to' address.

I'm looking forward to seeing the documentation and setting up Postal on my server.

[+] t3ra|9 years ago|reply
Sounds interesting. I have been looking for a proper mail Server for sending marketing only for a while now.

I'll wait for the doc to update but until then :

Does it do things like IP rotation?

Is it using postfix at the backend or its a complete mail Server

What kind of list management features does it have? (i am looking to compare with interspire)

[+] hultner|9 years ago|reply
I suppose this is more like a open source alternative to PowerMTA? How would you compare them?
[+] throwanem|9 years ago|reply
More an open-source alternative to Sparkpost, if you're looking to compare it with a Message Systems offering. (But not really all that comparable, since Sparkpost is nothing without Momentum, and this does not appear to rely on or include any specific MTA.)