Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

how hard is it to run your own smtp gateway in 2025? are you good if you just set up dkim and such?


This may not be what you're asking, but it's rather trivial if you're setting up an SMTP gateway that proxies traffic to another SMTP that handles the IP address reputation management etc.

E.g. I do that with Exim on my Debian laptop and have it relay outgoing messages to Gmail's SMTP. It's great if what you want out of it is being able to send E-Mail while "offline", the messages will get locally queued until you've got an outgoing connection, much better than relying on individual MUA's to handle that, and it'll work with one-off invocations like piping to mail(1) etc.


You also need a server with a good IP address reputation located in a non-sketchy country and a domain that isn't brand-new. And probably more.


You can also host your own MX servers but use a provider for SMTP. Almost any mail provider that supports custom domains will work at their lowest price point.


I'm pretty sure the reputation thing is overstated, else, how would all those providers be able to scale up their SMTP services themselves?


From experience, it's not overstated. Running your own email server is pain, and even if you do everything right you may get delivery problems. And if you want to improve your chances, you have to do whatever big tech wants you to. And if you ever get onto the bad side (for example, your site is hacked and distributes malware for a few days) you may never recover.

It's not impossible, but it's not something you run once and forget.


Gmail or Apple scaling up is going to be treated differently from some random new domain suddenly appearing on a Digital Ocean or Hetzner or AWS cloud instance.


But how would anyone know it's Gmail or Apple if the IP address is new?

That's exactly my point, that the reputation need is overstated by all those services that claim to solve a known problem that everyone has heard of, but noone has actually experienced, because, guess what, it might not actually exist.

I've seen plenty of cases where the emails sent out through Sendgrid et al, end up in the Spam folder, or these "professional" services don't even attempt to retry, thus, never getting through the greylisting, or other bugs which cause deliverability issues, which would never happen if you were to run your own real mail-server on your own hardware yourself.


Sendgrid, Mailchimp, et. al. ends up in the spam folder because most of what they send is spam.


I'm not disputing that assertion, yet it does go against the marketing materials we're all presented by all of these services, as for reasons to not run our own mailservers.

In other words, if all you want to do is run a personal mailserver, or even a corporate one, you'll probably not have to deal with this supposed IP reputation issue, unless the IP addresses you use, have already been added to the blacklists even before you start at it.


Running your own mail servers to do the volume emitted by Sendgrid would indeed be on the level of starting your own medium sized business. Getting IP allocation, swip'ing them out to divisions of your company or your customers and paying into whitelists for all the "free" email providers like Google et al would be a massive up front cost.

Running your own mail server for personal email is an afternoon of setup DKIM, DMARC, SPF, FCrDNS and such, setup of your MTA/IMAP/WEB preferences, tuning some filters, setting up aliases, accounts for family and with time the tuning work eventually slows down and then it's just maintaining accounts, aliases and the occasional rules to block problem networks and domains. With time you may find some servers that require lowering security or filters but that is also very easy.


Yes if you are using a domain that's been around for a while and has a reasonably stable IP address history and is not on any blacklists, that is the defintion of a "good" reputation. Or at least it's not a bad one.


There are a lot of small email hosting providers that don’t seem to have much trouble.


it's very easy to get blackholed by major providers like gmail though, and very difficult to get out


Running an smtp server to receive mail is supereasy as long as you have inbound port 25.

Or you can run a submission service that requires submitters to login, usually on port 587/465.

If you want to send from your server, that is way more difficult, requiring all kinds of safeguards, SPF, DKIM, ARC, reputation, etc. They keep making it more complicated, because that's the source of spam.

Or you can just submit mails to a relay, that will send mails for you, this can even be Google or some other MX service. This then always requires you to authenticate with your account.


Hard. You need reverse DNS, which means you need to have a machine with a stable ip, and convince the network operator to set up a PTR reverse DNS record for you. This part is fairly easy if you are renting a VPS with a fixed ipv4 address, just ask the rental company.

You also need to set up mx, dkim, dmarc, spf, and a bunch of other stupid DNS records related to dane/tlsa/mta-sts that aim to put bandaids on top of bandaids on top of what is the shitty unsecured and unencrypted email protocol.

Then you need to fight with a bunch of arcane 90s Unix programs to actually not be gaping security holes that will allow people to relay off of your MTA and get you blacklisted worldwide. You need to fight with a milter and acme client to finally get the TLS stuff right too. Then there's the need to set up a spam filter for your inbox (probably).


> Then you need to fight with a bunch of arcane 90s Unix programs to actually not be gaping security holes that will allow people to relay off of your MTA

how many decades has it been since this was actually the default config?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: