Our app 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.
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.
But you have some things missing from your calculation:
1) Attachments (yes, SES charges separately)
2) Dedicated IP addresses (SES charges you separately for this)
3) S3 (where emails are stored
4) AWS Lambda (because you need a script/function, that processes incoming messages as they come in).
But yes, you're right, with SES its cheaper than others, couple of thousand tops
> costs a lot more
The point was super clear, and yet you managed to miss it.
@jitbit clearly stated that he and his colleagues evaluated several possibilities, and the decided to set up their own system.
It's literally short-term decision: it's a make-or-buy problem.
The make options surely takes some time, but it is a one-time expense with pretty much low maintenance and super-low operating-cost ($4/month). It also requires some study but hey, that's know-how that is going to stay in the company.
The buy options is a lot more costly, but gives the gift of ignorance: you are not required to know or do anything.
And if you are wondering what the costs are: setting up a basic mail server for a domain takes as little as a couple of hours. A little-more complicated might take a day, and a complex setup not more than a week, for a skilled person.
Considering other options, it might just be cost-effective to hire a consultant to set it up.
Source: i've been running my mailserver for years, and I've done consulting in setting up and troubleshooting mail servers.
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.
Example: good practice is to reject (or at least defer) an email if the sending server is not listed in the domain's SPF record. But lots of people are sending email "on behalf" of gmail without even knowing it (when their mail-server forwards a gmail-message to another address, and this address never receives it).
There are tons of little gotchas like this that you need to look into :((
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.
Let's say GP's micro instance goes down, or extra load brings the need for a larger instance, can they spin up a different EC2 instance and reassign the existing public IP address to it?
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.
This is probably a key element of good performance. To keep my mail admin duties part time I simply whois the IP of evil senders and drop the resulting entire CIDR block into the our local blacklist.
A couple years ago I did the work to use "Mandrill" in an app and they got merged with "MailChimp" who changed how my app could use their service and I had to redo those routines again.
Right now I'm using Mailgun and they're awesome.
* 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.
Given this, and my volumes of mail were increasing (once you go over 100k emails/mo SendGrid's pricing goes up a lot), I setup my own mail server using Cuttlefish . I set it up on an OVH instance that I pay £2.50/mo for. I contacted them to enquire about spam policies before opening an account, and they said they take it very seriously and monitor outgoing SMTP for spam.
The IP address I ended up with was still on one blacklist, but the process to remove it was pretty easy (fill out a form, and explain the situation) and took about 1 day. I set this up around 6 months ago and have had no problems with deliverability since then, I'm now up to sending around 300k emails per month.
I've heard this many times, and maybe it was true before but it doesn't seem to be any more. I suspect now companies like Sendgrid still spread this FUD so people are more willing to buy their services and assume it's the only option.
And I don't show any bounces either. Stuff getting sent to spam doesn't give you a bounce message usually. It will appear to have been delivered successfully.
As for needing to warm up the IP, I think there is still something to that. I am surprised you were able to just start right off sending large volume. My guess would be that that you lucked out and got a gently used IP address by chance. The fact that it was on a blacklist would indicate that it probably was previously used rather heavily... just enough to get blacklisted at one place. But not abused in a way that got it blacklisted other places.
https://github.com/jimktrains/email_ng is an overly complicated idea I had once, but the basic gist is that the receiver could give the sender a signed receiver email address that is for the sender's email address. This way, transactional email (and sure, I guess marketing from your company) would be able to get through and the email given out wouldn't be able to be used if sold or stolen, as the receiving mail server would reject it because of a bad signature (bad sender, and coupled with DKIM and SPF, a malicious user wouldn't be able/allowed to spoof the sender's email).
Your proposal requires at least the status quo (aliased email address at signup), but the problem is it also requires cooperation of the receiver's email provider (e.g. gmail) and the sender's email provider. You are unlikely to ever see any new standard adopted by all major email providers, unless it came through a standards committee.
But your idea is interesting. Perhaps you could lower the cost of adoption by replacing the dependency on TLS/SSL with some sort of pgp signing scheme. This way all the "protocol" happens within the message body, so email providers do not need to adopt a new standard. As long as at least one website and one user implement the protocol, it can work without any cooperation from third parties.
As an aside, it would also be nice if password managers included functionality around generating temporary/isolated email addresses.
It’s not a comment. Some mail services allow you to have aliases in the form of email@example.com but that doesn’t mean all do. If it were a comment the address +@example.com would be invalid but it’s not. Comments in email addresses are written in parentheses like username(i'm_a_comment)@example.com.
I rarely receive email spam these days. The spam I get is on my voice line. I'm getting several robocalls per day. If you have the skills to work on this stuff, I'd love to see a solution to phone call spam because email spam feels solved.
we definitely need a better solution to fighting spam.
For phone calls, somewhere between 30 and 50 percent of my calls are robocalls or other telemarketing (I receive far more emails than phone calls).
If there were an easy way to tell my phone to just drop callers if they aren't in my phone book, I would. Right now, my phone lets me know if a caller is a suspected spammer, but when I hit dismiss, it goes to voicemail. I'd rather have the call just dropped or for the caller to get a busy signal. That reminds me - I can't remember the last time I heard a busy signal.
My greatest fear is that Google and Facebook will co-opt email and charge money for companies to get access. Google has already made some progress with this by selling ads in Gmail that look like email while pushing commercial messages in to other inboxes.
This is bad because it penalizes companies with low margins while shifting the advantage to those who are able to squeeze more money out of the users (you can see the effect of this on Google Search, Facebook, and now Amazon. It isn't pretty.)
A DIY home mailserver will still let, like, 5-15% of spam emails slip through.
The last few times I went to spam and saw emails that shouldn't be in there, a careful inspection revealed they were actually very well crafted phishing messages.
Ever since, I don't bother checking the spam folder. Too dangerous. Gmail is smarter than me.
I'd start with the "email postage" proposal—the one where either a proof-of-work or physical payment (which can also be digital, e.g. a Bitcoin private key) is required to get an MTA to take your message. This proposal was declared unworkable due to rendering high-volume transactional email impossible.
1. as you say here, divide everyone's email account into a set of "channels" (i.e. subaddresses in a+b@c form, that each have a corresponding message signing key), with one or more published or well-known channels, and then individual private channels for each contact/list, or for each conversation(!);
2. make MTAs aware of "channels", and extend both SMTP and email web services to allow users to configure their provider's end-of-line MTA, over-the-wire, to set the amount of "postage" required to message each channel they own. (This way, the MTA doesn't have to be aware of the distinction between private and public channels; they're just destination addresses with a stored config parameter.)
3. make the MTAs that use channels, reject any Internet message directed to the base address without a channel. (Messages generated by the MTA itself can arrive without a channel.)
4. Set the clients' default new-channel configurations such that public channels have a cost, and private channels are free.
5. In email clients, add a "Subscribe" or "Allow" action-bar item to messages that identify themselves as email-confirmation/newsletter-opt-in emails (presumably with a header), that, when clicked, creates a new channel for the sender, and replies to the message with the signing key you want them to use attached. (All this would be hidden from view; the reply message wouldn't end up in your Sent Items.)
6. In transactional-email-sending services like Sendgrid/Postmark/etc., create a distinction between "opt-in messages" and "ongoing transactional messages"; allow each account to send one "opt-in" email to each previously-unknown destination-address (and charge for this); but then, for that account, put that destination-address into holding state, where the account can't send them any "ongoing transactional messages", until the email-sending service receives the user's conversation key. (You probably want to allow accounts to re-send the opt-in email after a 24-hour-cooldown, though. Though they'd have to pay again!)
7. In any product/service backend that uses a transactional-email service, consider new signups unconfirmed until the transactional-service reports (by polling or webhook or whatever) that the user has replied with a key and is now in the "authenticated and free to send to" state.
A bit complicated in the initial changes, but in the ongoing state it's nearly ideal: it costs money to initiate contact with an address, or to continue pestering an address that doesn't want to speak with you, but not to send messages to someone that wants to hear from you. (Though, a user can "unsubscribe" from your list simply by telling their MTA to begin charging you to deliver to their channel again—maybe, UI-wise, by just deleting the channel. Transactional-email sending services could detect the bounced-with-payment-required delivery error, and put the user automatically into an "unsubscribed" state, which could webhook you to let you know!)
https://senderscore.org/ per https://news.ycombinator.com/item?id=9156312
http://whatismyipaddress.com/blacklist-check per https://news.ycombinator.com/item?id=11329371
http://multirbl.valli.org/ per https://news.ycombinator.com/item?id=11330382
This is because the big consumer mailbox providers often don't rely on public datasources for assessing reputation, and because reputation is tracked at the domain level, in addition to - or sometimes instead of - the IP level.
For example, there have been some indications from Gmail that they no longer use IP reputation at all, starting a year or two ago.
And re: blacklists: +1 to Spamhaus, but in practice it's one of very few blacklists that have meaningful impact to net delivery.
I can believe it. I posted already about my experience with the free tier of Mailgun's service. I went through all their instructions about setting up the service and verifying my domain etc. but still had a lot of email rejected, especially by yahoo.com but also hotmail.com due to poor reputation IPs
Gmail.com typically delivered everything.
(I do not have anything to do with the product or team behind it)
(I am likewise unaffiliated.)
In years past, many RBLs would categorize IP Addresses by type. e.g. dynamic IPs assigned to DSL/Cable subscribers. This would enable a receving SMTP server to check if the email came from an ISP subscriber, rather than an email server. If so, it was usually a good guage that the email was "spammy", because it was sent by a subscriber's infected computer.
In this sense, it was (and may still be) possible to simply block, or at least score differently, email from any/all AWS Elasic IPs.
Neither, though, helps with checking if one of the big providers, like Google, would not like your IP. For those, you have to send an email and watch/parse the SMTP error responses.
I have found their nighttime support team to be terrible though, resulting in 14hrs downtime because they didn't have authority to re-enable my account.
I'm unsure what problems Sendgrid is battling but their customer support staff is certainly understaffed or they simply gave up on fighting spam. So yes if you want to send spam and can start with highest paid account they offer, probably Sendgrid is your best bet.
Also their spam@ and abuse@ is a waste of time. It came to point that they simply started ignoring my inquiries at all! Here is example of one of my emails that is not getting any response, if Sendgrid is actually reading this: firstname.lastname@example.org
As sending spam is a Federal Crime, I have already reached out to FBI, FTC and next plan to write my State Attorney General.
If you are seeing continuous problems, I'd love to take a look! My email address is on my profile.
In the case of Mailgun, you should be assigned an IP with a neutral reputation. For example, before dedicated IPs are reassigned we leave them dormant for at least a month, usually much longer, before assigning to a new customer.
Mailgun will do some chores for you, for a fee. If those chores are things you can do in your sleep, fine! Mailgun does nothing magic.
I gave up and decided screw them, I don't need to talk to anyone with an ATT address, and bounce messages from them with an explanation.
- You have to ramp up sending from new IP addresses VERY slowly if you want to avoid getting grey / black listed by Yahoo and AOL, this makes it quite a tedious process
- Make sure you also have rDNS set up, Gmail uses it as an important quality signal
- Accurately handling bounces is a bit of a nightmare because each mail server has a slightly different format and you want to make sure you don't process out-of-office messages
- Bounces and "message delayed" messages can arrive days later
So we ended up switching to mailgun and although they do sometimes give you a bad IP the time saved is worth it, especially their option to have a web hook back to your backend to process the bounces.
Until then, all is fine I agree.
Why does Gmail hate my domain? | https://news.ycombinator.com/item?id=9855030
How to Avoid Spam Filters | https://news.ycombinator.com/item?id=10465639
If there are others I'd appreciate a link!
Of course, if it's that important, then you'd be foolish to not have invested in a better solution, or to not have a proper SLA with a third party.
The answer to why better spam filtering AI hasn't been developed in a non-proprietary setting is fairly straightforward: the success of any filtering method is heavily dependent on consuming data at scale - including recipient behavior (e.g., mark as spam, vs. spend time reading a message), and this underlying data is just as important, if not more so, than the machine learning approach used to compute filtering assessments.
In short - you more or less have to be a large mailbox provider in order to have a chance at doing this well.
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.
This UI with an Amazon SES backend would be ideal.
The Sendy codebase is horrifying. [...]Just lots and lots of rough PHP _vs_ This isn't software to be used for analysis. Sendy is f-in awesome!
Amazon SES rocks from a pricing standpoint but deliverability isn't its strong suit _vs_ I find no difference between SES and MailChimp regarding delivery
I would stick with Sendy, but I could never get the unsubscribe links to work _vs_ there is a version 2 of Sendy, which appears to fix all these problems
lighter version of Mailchimp and super cheap [...] Configuration is a bit painful
I have been using it for almost 1.5 years and really like it.
if you are taking all the trouble to install Sendy you should look at Mandrill (2 years go) _vs_ Major changes to Mandrill, must be tied to a MailChimp account (1 year ago) | https://news.ycombinator.com/item?id=11170713
Also self-hosted: https://github.com/bevacqua/campaign | http://directmailmac.com ($100)
Hosted Sendy: https://www.sentopia.net/
Other/creative alternatives: http://tinyletter.com/ (5000 free) | https://domain.yandex.com/domains_add/ (500 outbound/day) | https://www.zoho.com/workplace/pricing.html
This comparison was a very good overview of hosted options: https://www.metachris.com/2016/03/free-transactional-email-s... | https://news.ycombinator.com/item?id=11328631
And the discussion there linked this detailed sheet: https://docs.google.com/spreadsheets/d/1Nb1YqYJq9eWm6ojLDRXd... | https://sendyhost.com/mandrill-alternatives-245/
SES did introduce tracking back in 2014 or so. You can get notifications for deliveries, bounces, and complaints.
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.
(Disclaimer: Developer of mailspice)
Be careful with some of the alternatives and be sure to read their source code with an empty stomach.
> 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.
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.
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.
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 ;)
I don't think this is going to work in their favour - spammers already have the tools they need - the real killer is blacklisted IP's/ranges.
If you're legit, you can jump through some hoops if you inherit a blacklisted IP.
If you're a spammer, all you can do is try to get an IP that isn't blacklisted.
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.
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"?
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
How would I go about getting a static IP or a reputed IP?
I'm looking forward to seeing the documentation and setting up Postal on my server.
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)
Disclaimer: I'm a co-founder of EmailOctopus.
Just pedancics/semantics from me; many in this situation include the info (some:only) in the profile instead/as well and that has been mostly accepted in the past. I also appreciated your mention of another alternative too, it's definitely not over-the-top astroturfing in any way!
PS. Add yourself to AlternativeTo.net
We're already on AlternativeTo but unfortunately below the fold on most of our competitors.
This actually showed up right away (suprising even though I use alternativeto.net often, nice SEO on their part) - and it had useful info!
If you have, what's your experience with them vs Mailgun or Sendgrid?
How would you rate the deliverability out of 100% for Elastic Email and SparkPost?
> Think Sendgrid, Mailgun or Postmark but open source and ready for you to run on your own servers.
Your comment fails to answer the question: "Did this HN user even RTFT(itle)?"
+ Free: I can run Postal on my own hardware, with no usage limits or costs other than the VPS or AWS costs (which I'm paying anyway)
+ Independent: I'm not relying on a third-party to provide core features. If SendGrid goes down there's nothing I can do about it
+ Private: Maybe I don't want to hand over a list of my user's email addresses to SendGrid.
> Free: I can run Postal on my own hardware, with no usage limits or costs other than the VPS or AWS costs.
So is postfix.
> Independent: I'm not relying on a third-party to provide core features.
What features? This is the crux of the question. What do you actually need that justifies having to maintain a web application?
> Private: Maybe I don't want to hand over a list of my user's email addresses to SendGrid.
Again... so is Postfix.
Imagine a retail business that relies on emails to get information on what's next: what are the most popular products, what's a good tag line, which segment of its customers are interested by what, who is most likely to buy. Sendgrid allows you to add A/B testing, scheduling (send a % of emails at a specific hour), track who opened emails when, track who unsubsucribed.
If you are doing simple emails like email confirmation or simple user reminder, these features are totally overkill. But email has still the best ROI for many businesses and thats why they need sendgrid
If there were no valid existing answers to your questions, Mailgun, Sendgrid and others would not exist, right?
These platforms provide OOB business and productivity tools (logs, metrics, dashboards, API integrations, etc) that Postfix does not.
Sure you can write all your own stuff on top of Postfix, but not everyone wants to do that.
Mailgun's 30-day retention period is also a bit absurd, since most of our clients require mail audit trails in the region of 6-12 months.