SMPT Relay Service

Self-Hosted Mail Server vs Managed Relay: The Honest Comparison

A self-hosted mail server blocked by three barriers — port 25, policy blocklisting and no borrowed reputation — against a clear smarthost path on port 587 to the recipient

Before weighing this up yourself, it is worth knowing what the cloud providers say. Microsoft’s own documentation on sending email from Azure virtual machines does not explain how to configure Postfix. It says, “We recommend you use authenticated SMTP relay services to send email from Azure VMs.”

That is the company selling you the virtual machine telling you not to send mail from it directly.

Self-hosting a mail server is not hard because the software is difficult. Postfix and Dovecot are mature, well documented, and a competent engineer can have them running in a weekend. It is hard because the email ecosystem is deliberately built to route outbound mail through authenticated relays, and almost everything downstream of your server assumes you did that.

Quick Answer

Your situationVerdict
Transactional mail to customers at any volumeManaged relay. This is not close
Marketing or bulk sendingManaged relay. Reputation management is the entire job
Internal-only mail that never leaves your networkSelf-host. No external reputation to manage
Air-gapped or regulated environment, data cannot leaveSelf-host. Compliance outweighs convenience
Receiving mail into an applicationSelf-hosting is reasonable — inbound is far easier than outbound
Learning how email actually worksSelf-host. Genuinely the best way, on a domain you do not need
You are an ESP, and deliverability is your productSelf-host. You will need a mail team

The pattern: self-hosting makes sense when you are not asking strangers’ mail servers to trust you. The moment you are, you have taken on a permanent job rather than completed a setup task.

Setup Is a Weekend. Staying Deliverable Is Permanent.

This is the distinction that most build-versus-buy discussions miss, because setup is the part you can picture and the ongoing work is the part you cannot.

Setup — finite, satisfyingOperations — permanent, invisible
Install and configure PostfixMonitor blocklists continuously
Publish SPF, DKIM and DMARC recordsRead and act on DMARC aggregate reports
Set up a PTR record for the sending IPRenew TLS certificates before they expire
Configure TLSPatch promptly when a CVE lands in your MTA
Send a test message that arrivesWarm the IP, then keep volume consistent forever
Feel pleased with yourselfHandle bounces and complaints, build suppression logic
Register for feedback loops with each major receiver
Investigate when one provider silently starts filtering you

The left column is a weekend. The right column has no end date, and nobody is assigned to it — which is how self-hosted sending usually fails. Not with an outage, but with a slow decline that nobody owns until a customer says they stopped getting receipts.

Barrier One: Port 25 Is Blocked by Default

Three sourced barriers to self-hosted sending — port 25 blocked per Azure documentation, policy blocklisting per Spamhaus, and zero starting reputation — with authenticated relay on port 587 as the recommended route
None of these is a configuration problem. All three are deliberate design.

Your mail server needs to open outbound connections on TCP port 25 to deliver to other mail servers. On commodity cloud infrastructure, that port is usually closed before you start.

Microsoft’s documentation is unusually direct about it: “The Azure platform blocks outbound SMTP connections on TCP port 25 for deployed VMs.” The exceptions are standard Enterprise Agreement and MCA-E subscriptions. Enterprise Dev/Test is blocked by default with an exemption process. Everything else is blocked, and “sending email on Port 25 is unsupported for all other Azure Platform-as-a-Service resources.”

Even where the block does not apply, Microsoft adds a caveat worth reading twice: “there’s no guarantee that external domains accept the incoming emails.” Unblocking the port gets you to the starting line, not across it.

Other providers behave similarly. DigitalOcean restricts port 25 on new accounts, as we covered in sending email from a DigitalOcean VPS, and AWS applies throttling to EC2 outbound port 25 by default.

Note what Microsoft recommends instead: an authenticated relay on port 587, which “isn’t restricted in Azure, regardless of the subscription type.” The infrastructure is built on the assumption that you will relay.

Barrier Two: Your IP Is Listed Before You Send Anything

This is the barrier that surprises people, because it has nothing to do with your behaviour.

The Spamhaus Policy Blocklist catalogues IP ranges that, as a matter of policy, should not be sending mail directly to other mail servers. The crucial wording: listed addresses “are not necessarily ‘bad’ — simply, they should never be sending email.”

Listing reflects policy, not misconduct. Spamhaus’s own guidance for senders on those ranges is to submit mail “through an authenticated SMTP server, which then delivers it” — either the ISP’s or an external mail service.

So a brand-new server on a commodity IP can be treated as ineligible to send before it has delivered a single message. That is not a reputation you can repair by sending well, because it was never about how you send.

Note

This is the point where the two barriers compound, and why “I’ll just get the port unblocked” does not solve it. Port 25 being open is a necessary condition for direct delivery, not a sufficient one — the receiving server still decides whether to accept your connection, and a policy listing on your IP range is a reason to refuse it that has nothing to do with your configuration, your authentication records or your sending practices. You can have flawless SPF, DKIM and DMARC, a valid PTR record, perfect TLS, and still be declined because of the neighbourhood your address sits in. Checking an address before you commit to it is worth ten minutes — our blacklist checker guide covers how.

Barrier Three: There Is No Way to Borrow Reputation

A managed relay delivers your first message over infrastructure with years of established standing at every major receiver. Your own server starts at zero, and zero is not neutral — unknown senders are treated with suspicion by default.

Warming a new IP means starting at low volume and increasing gradually over weeks, keeping the volume consistent throughout. Our warm-up schedule guide and domain warm-up guide cover the mechanics.

Two things make this harder than it sounds for a self-hoster.

Transactional volume is not yours to schedule. A warm-up plan assumes you control how much you send each day. Password resets and receipts are driven by your users, so you cannot throttle them to fit a ramp without delaying mail that people are waiting for.

Low volume never builds much reputation. A server sending a few thousand messages a month gives receivers very little history to judge, so every bad week weighs heavily with nothing to average against. This is the same arithmetic that makes dedicated IPs a poor idea at modest volume — see shared IP versus dedicated IP.

Meanwhile the compliance bar keeps rising. Google’s bulk sender requirements ask for SPF and DKIM, a DMARC record, domain alignment, one-click unsubscribe on marketing mail, and a user-reported spam rate below 0.1% that never reaches 0.3%. Those apply to you identically whether you run Postfix or pay a relay. The difference is who does the work.

Quick Fix

The Monthly Job You Are Signing Up For

  • Check your IP and domain against major blocklists — listings happen without notice
  • Read your DMARC aggregate reports, which arrive as XML and need parsing to be useful
  • Confirm TLS certificates are valid and renewal automation actually ran
  • Apply MTA security patches — a mail server is internet-facing by definition
  • Review bounce and complaint rates against Google’s 0.1% target, from your own logs
  • Verify your suppression list is being honoured on every send path
  • Check inbox placement with seed tests, because delivery is not placement

The Cost Comparison Nobody Runs Honestly

A small VPS shown as the only visible cost of self-hosting above six hidden operational costs, against managed relay prices from $5.00 to $55.00 a month at fifty thousand emails
The server is nearly free. The attention is not, and it is the larger number.

Self-hosting looks cheap because the visible cost is a virtual machine. Let us put the actual numbers next to each other, using relay prices verified across this series.

At 50,000 emails/monthCost
Amazon SES, à-la-carte$5.00
Postmark Basic$55.00
SendGrid Essentialsfrom $19.95
Resend Pro$20.00
Self-hostedA small VPS, plus every hour in the list above

So the question becomes concrete: how much engineering time does $20 a month buy?

At almost any loaded engineering rate anywhere in the world, twenty dollars is well under an hour. Take your own hourly cost and divide — then compare the result against the monthly checklist above, which is more than an hour of attention in any month where something goes wrong, and several hours in the month it does.

# The honest TCO comparison, as a formula you can fill in

  Relay cost     = $20/month at 50,000 emails   (verified, published)

  Self-hosted    = VPS cost
                 + (hours/month x your loaded hourly rate)
                 + (incident hours x rate, when a listing happens)
                 + the opportunity cost of what those hours
                   would otherwise have built

# The VPS is the only term in that sum you can quote confidently.
# It is also the smallest one.
#
# And there is a term with no price at all: a burned sending
# domain. There is no invoice for that and no quick undo.

That last point deserves emphasis. A misconfigured relay costs you a support ticket. A self-hosted server that gets your domain listed costs you weeks of degraded delivery to every customer, and domain reputation recovers slowly. Our guide to reducing bounce rate covers why early signals carry disproportionate weight.

Common Mistake

Comparing the VPS bill against the relay bill and concluding self-hosting is cheaper. It is the same error as comparing a car’s purchase price against a taxi fare while ignoring insurance, servicing, fuel and parking — except that here the ignored costs are mostly your own time, which has the awkward property of feeling free at the moment it is spent. A five-dollar server genuinely is cheaper than a twenty-dollar relay bill, and that comparison is still wrong, because the server does not include the person who checks the blocklists, parses the DMARC reports, patches the MTA and investigates why Outlook started filtering last Tuesday. Price the hours, even roughly, and the arithmetic usually reverses before you reach the second line.

Where Self-Hosting Is Genuinely the Right Call

This article would be dishonest if it claimed self-hosting is always wrong. There are real cases, and they share a property: you are not asking strangers to trust your IP.

Internal-only mail. Alerts to your own team, cron output, monitoring notifications that never leave your network. No external reputation, no blocklist exposure, no compliance bar. Self-host without hesitation.

Air-gapped or regulated environments. If your compliance regime says message content cannot transit a third party, that settles it and no cost comparison applies. Build it properly and staff it.

Inbound mail. Receiving is a fundamentally easier problem than sending, because nobody has to decide whether to trust you. If you need mail routed into an application, self-hosting the receiving side is reasonable — though check whether your provider gives you inbound routing first, as we covered in migrating from Mailgun.

Learning. Running your own mail server teaches you more about SMTP, DNS and deliverability than any amount of reading. Do it on a domain whose reputation you do not need, and the education is worth the weekend.

Being an email service provider. If deliverability is your product rather than your overhead, you will build this and hire people to run it. That is a different business, not a cost optimisation.

The Hybrid That Actually Works

There is a middle option that gets overlooked, and for teams with an existing mail server it is usually the right answer.

Keep your mail server. Point its outbound at a relay.

Postfix calls this a smarthost. Your server continues to handle queuing, local delivery, aliases and whatever else it does, and hands outbound messages to an authenticated relay on port 587 for the last mile. You keep the control and the local integration; the relay carries the reputation and the compliance burden. Our Postfix smarthost configuration guide covers the setup.

PhotonConsole works as a smarthost target on port 587 like any authenticated relay, so an existing Postfix install needs a credentials block rather than a rebuild. This is also precisely what Microsoft’s documentation recommends for Azure VMs, and it sidesteps every one of the three barriers: port 587 is not blocked, the relay’s IPs are not policy-listed, and the relay’s reputation is already established.

Quick Fix

If You Are Going to Self-Host Anyway

  • Use a separate subdomain for it, never your root domain — if reputation burns, burn something recoverable
  • Check the IP against blocklists before you commit, and confirm you can set a PTR record for it
  • Verify the provider permits port 25 in writing before building anything
  • Set up DMARC reporting on day one and route the XML somewhere that parses it
  • Name the person responsible for the monthly checklist, and put it in their calendar
  • Keep a relay configured as a smarthost fallback so you can switch outbound in minutes
  • Verify with MXToolbox and Mail Tester before any real mail flows

On PhotonConsole that fallback costs nothing until it carries traffic, which is the point of configuring it in advance. The sixth item is the one that saves projects. A smarthost fallback you have already tested turns a reputation incident from a week-long emergency into a configuration change.

Pro Tips

  • Read your cloud provider’s SMTP policy before anything else. Azure blocks port 25 on most subscription types.
  • A policy blocklist listing is not about your behaviour. You cannot send your way out of it.
  • Price the hours, not just the server. The VPS is the smallest term in the sum.
  • Never self-host outbound on your root domain. Use a subdomain you can abandon.
  • Transactional volume cannot be throttled to fit a warm-up plan. Your users set the pace.
  • Self-host inbound if you like; relay outbound. They are different problems with different difficulty.
  • Configure a smarthost fallback before you need it. Test it once, then forget it until you do.
  • Google’s requirements apply either way. Running your own server does not exempt you from the 0.1% spam target.

Related Reading

Frequently Asked Questions

Can I send email from my own mail server on a cloud VM?

Often not directly. Azure blocks outbound port 25 for most subscription types, DigitalOcean restricts it on new accounts, and AWS throttles EC2 outbound port 25 by default.

What does Microsoft recommend instead of self-hosting?

Its documentation states: “We recommend you use authenticated SMTP relay services to send email from Azure VMs or from Azure App Service,” on TCP port 587, which is not restricted regardless of subscription type.

Why is my new server’s IP already on a blocklist?

The Spamhaus Policy Blocklist catalogues ranges that should not send mail directly, as policy rather than punishment. Listed addresses “are not necessarily ‘bad’ — simply, they should never be sending email.”

Can I get removed from a policy blocklist?

It is not a reputation problem you can fix by sending well, because it was never about your sending. Spamhaus’s guidance is to send through an authenticated SMTP server instead.

Is self-hosting cheaper than a managed relay?

Only if your time is free. A relay is about $20 a month at 50,000 emails, which is under an hour of engineering at most rates — and self-hosting needs more than an hour of attention in any month where something breaks.

When is self-hosting the right choice?

Internal-only mail, air-gapped or regulated environments, receiving mail into an application, learning, and being an email service provider yourself. All share one property: you are not asking strangers to trust your IP.

Is receiving mail easier than sending it?

Considerably. Nobody has to decide whether to trust you when you receive, so most of the reputation and compliance burden does not apply.

What is a smarthost?

A relay your own mail server hands outbound mail to for final delivery. You keep local control and integration; the relay carries the reputation and compliance burden.

Do Google’s sender requirements apply to self-hosted servers?

Yes, identically. SPF, DKIM, a DMARC record, alignment, one-click unsubscribe on marketing mail, and a spam rate below 0.1%. Running your own server changes who does the work, not what is required.

Conclusion

The strongest argument against self-hosting outbound email is not made by relay vendors. It is in Microsoft’s own documentation, which tells you to use an authenticated relay from the virtual machines it sells you, and in Spamhaus’s, which says plainly that end-user ranges “should never be sending email” and that mail from them belongs on an authenticated server instead.

The ecosystem is built on the assumption that outbound mail relays. Port 25 is closed by default, your address is policy-listed before you send anything, and reputation cannot be borrowed. None of those is a configuration challenge you can solve with a better tutorial.

And the cost case does not survive an honest look either. A relay is around $20 a month at fifty thousand emails, which buys less than an hour of engineering almost anywhere, against a monthly checklist that will exceed an hour in any month where something goes wrong. The VPS is the only number in the self-hosted column you can quote with confidence, and it is the smallest one. The term with no price at all is a burned sending domain.

Where self-hosting genuinely wins — internal mail, air-gapped environments, inbound processing, learning — it wins for a consistent reason: nobody has to decide whether to trust you. The moment strangers’ servers do, you have taken a permanent job.

If you already have a mail server and like it, the answer is not to tear it out. Point its outbound at a managed relay as a smarthost and keep everything else. You retain the control, and the relay carries the part that never finishes. PhotonConsole bills flat per thousand with no plan tiers — the pricing page and the comparison page set out the options, and if cost per email is genuinely all that matters, Amazon SES is cheaper than we are and the right pick.

Read More

phoconadmin

About Author

Leave a comment

Your email address will not be published. Required fields are marked *

You may also like

Email Deliverability SMPT Relay Service

SMTP Authentication Error: Causes & Solutions (Fix SMTP Error 535 Step-by-Step)

Your transactional emails have stopped sending. OTP codes are not reaching users. Password reset emails are failing silently. Your application
Test an SMTP Server testing workflow showing connection check, authentication validation, and email delivery verification from application to inbox
Email Deliverability SMPT Relay Service

How to Test an SMTP Server (Step-by-Step Guide)

Learn how to test an SMTP server step by step, fix common errors, and ensure reliable email delivery with proper