Deliverability

Self-hosted mail server going to spam at Google? Is a relay worth it

If your self-hosted server passes SPF, DKIM and DMARC but Gmail still sends mail to spam, the cause is usually reputation, not records. A relay on an established IP often fixes it, but read your headers first so you know what you are fixing. Here is how to tell, and what to do.

Sohail HussainSohail Hussain11 min read

Short answer

  • Passing SPF, DKIM and DMARC only proves who sent the mail. Gmail also scores your IP and domain reputation, and a small or quiet sender often has too little history to earn trust.
  • Read the headers of a spam-foldered message first, then check PTR, TLS and sending pattern. If all of that is correct, a relay on an established IP is often the quickest fix for low-volume, mixed-purpose servers.
  • A relay does not fix a poor domain reputation or recipients who report your mail as spam, because both travel with you.

You run your own mail server on a clean IP block. SPF, DKIM and DMARC all validate, and Gmail still sends your messages to spam. Postmaster Tools shows almost nothing, and nobody at Google answers. The question that follows is whether paying for Mailgun, SendGrid, SocketLabs or a similar relay is worth it.

Why Gmail flags authenticated mail from a clean server

Authentication and reputation are separate checks. Google's sender guidelines list authentication, valid forward and reverse DNS, TLS and a low spam rate as separate requirements, and say that if you don't meet the requirements, your email might not be delivered as expected, or might be marked as spam. You can pass the first group and still fail on the rest.

The usual causes, most common first:

  1. No history. A new or rarely used IP and domain have no track record with Gmail. A clean blocklist status means nobody has listed you; it does not mean Gmail has positive history with you.
  2. Recipients have not engaged. Messages sent from an address in the recipient's contacts are less likely to be marked as spam. Cold or first-contact mail gets none of that benefit.
  3. Sending pattern. Google advises to send email at a consistent rate and avoid sending in bursts. A quiet IP that suddenly sends a batch looks like a compromised host.
  4. Infrastructure gaps that authentication does not cover, such as a missing or mismatched PTR record, no TLS, or a wrong HELO name.
  5. Content and links. Hidden content, unclear links and mixed message types all count against you.
  6. User spam reports. Over time, user spam reports can lower your domain's reputation.

Why Postmaster Tools shows so little: if your volume to personal Gmail accounts is too low, the dashboards might not include data for your domain, to protect Gmail users' privacy. That is normal for a small sender, not a verdict on you.

There is a second trap. Google's own documentation says that when Gmail automatically sends a significant share of your messages to spam, the spam rate shown is low, because recipients get fewer of your messages in their inbox. A tiny spam rate in Postmaster is therefore not proof that Gmail likes you.

Step-by-step: find out which cause is yours

1. Read the headers of a spam-foldered message

  1. Open a test message that landed in spam.
  2. Open the three-dot menu and choose Show original.
  3. Check the summary at the top: SPF, DKIM and DMARC should each say PASS. A FAIL, SOFTFAIL or NEUTRAL means you have a configuration problem, not a reputation problem.
  4. In the Authentication-Results header, confirm the DKIM d= domain and the SPF-checked domain match your From domain. A pass on a different domain does not satisfy DMARC alignment.
  5. In the Received chain, confirm the connecting IP is the one you expect and that its reverse DNS matches your HELO name.

Paste the headers into our email header analyzer to see each hop. For background, read understanding email headers.

2. Check reverse DNS, TLS and format

Gmail's guidelines ask that sending domains or IPs have valid forward and reverse DNS records, also referred to as PTR records. They also ask you to use a TLS connection for transmitting email and to format messages according to RFC 5322.

  • Confirm the PTR record resolves forward to the same name your server announces in HELO.
  • Send over STARTTLS with a valid certificate.
  • Make sure one From address is used per message category, for example receipts from one address and promotions from another. Google advises that messages of the same category should have the same From: email address.

3. Check sending pattern and content

  • Ramp volume slowly and keep the rate steady. See email throttling and rate limits.
  • Avoid link shorteners, mismatched link domains and image-only bodies. Our spam checker is a word-list scorer, not a real filter test, so use it only as a rough prompt.
  • For bulk or marketing mail, add List-Unsubscribe headers with one-click support.

4. Run two controlled tests

Send the same message in two ways and compare.

  • To a Gmail account that has replied to you before, and to a Gmail account that has never heard from you. If only the stranger's copy goes to spam, you have a trust problem with cold recipients, not a technical fault.
  • Through a different path, such as a mailbox at a large provider or a trial relay. If that copy reaches the inbox, your IP or domain history is the variable.

A seed list test can add data, but a handful of seed inboxes will not match how Gmail treats your real recipients.

5. Make your first messages easier to trust

If your recipients are people who expect your mail, Google suggests they can remove your message from Spam with Not spam, or add you to their Google Contacts, so your emails don't go to Spam. That helps individual recipients but does not fix reputation for everyone else.

Do not buy a relay before step 1

A relay changes your sending IP, not your headers, content or list. If the real cause is a misaligned DKIM domain or a missing PTR, you will pay for a relay and get the same result.

Is an SMTP relay worth it?

For small or irregular senders, often yes. A relay such as Mailgun, SendGrid or SocketLabs sends from IP ranges that already carry volume and history, so Gmail has something to base trust on. You also get bounce and complaint handling you would otherwise build yourself. Pricing and plans change, so check each vendor's current pricing page before deciding.

Two honest limits. Google says it doesn't accept allowlist requests from email providers, and can't guarantee that messages sent by email providers will pass Gmail's spam filters. And Google notes that using the same IP address or domains for multiple senders can result in low reputation, or poor deliverability for all senders using it. A shared pool carries other tenants' behavior.

OptionGood forWatch out for
Keep self-hostingSteady, wanted mail; full control; low costYou own IP reputation, monitoring and delisting
Shared-IP relayLow to moderate volume; quick improvementOther senders on the pool can drag reputation
Dedicated IP at a relayHigh, steady volumeNew IP starts with no history and needs a gradual ramp
Split by mail typeMixed workloadsMore moving parts, but isolates risk

People who have run into this on sysadmin forums tend to make the same point: transactional mail and person-to-person mail want different homes. I agree. Relays are built for application traffic and bulk. Mail that staff write to each other is best sent from the real mailbox provider, with the relay used for system messages. That also keeps your system mail's reputation separate from your staff's.

My view: under a few hundred messages a day, running your own outbound gains you little, and a relay costs less than your time. If you send steady, wanted mail, your IP has aged well and only some recipients are affected, fix what the headers show and stay put.

Moving outbound to a relay without breaking authentication

Each vendor gives you its own records; use theirs. The SPF shape is:

example.com.  TXT  "v=spf1 include:relay-vendor.example ~all"
  1. Add the vendor's SPF include to your existing record. Publish only one SPF record per domain.
  2. Publish the DKIM records the vendor gives you, usually CNAMEs or a TXT. The SPF generator and DKIM generator help with syntax.
  3. Keep DMARC at p=none while you check alignment in reports, then tighten. See how to set up SPF, DKIM and DMARC.
  4. Watch your SPF lookup count; every extra include pushes you toward the 10-lookup limit.
  5. Point your MTA's smarthost at the relay, with authentication and TLS.

When a relay will not help

CauseSymptomDoes a relay fix it?
Young or unknown IPSpam folder, no Postmaster dataUsually yes
Misaligned DKIM or SPF domainDMARC fails or aligns on the wrong domainNo, fix DNS
Missing PTR or HELO mismatchRate limiting or rejectionMostly, the relay supplies its own
Poor domain reputationSpam even from clean IPsNo, the domain travels with you
Recipients report spamHigh user-reported spam rateNo, fix the list and content

For a damaged domain or a poor list, clean up first: remove bounces and non-engagers and tighten what you send. Google's Postmaster guidance is to send email only to recipients who want to get messages from you, and make sure recipients opt in. If a blocklist is involved, delisting goes through that list's own process; see blacklist.

Be patient with results. Google states that it can take time for improvements in spam rate to reflect positively on spam classification. Judge a change after a couple of weeks of steady sending, not an afternoon.

Checklist before you try again

  • SPF, DKIM and DMARC all PASS and aligned with the From domain
  • PTR record exists and matches the forward record and HELO name
  • STARTTLS works with a valid certificate
  • One From address per message category
  • Sending volume is steady, not bursty
  • Domain added to Postmaster Tools (data may stay empty at low volume)
  • Same message tested to a warm and a cold Gmail recipient
  • Same message tested through a second sending path

If nothing works

Google rarely responds to individual server operators about a single filtered message, and its own guidance says you might need to send enough volume to generate Postmaster Tools data before a Sender Contact Form request can be analyzed. A relay vendor's support team is usually the faster channel once you are a customer. If a recipient's filter such as Barracuda rejects you, its removal form will ask for the bounce text and the sending IP.

Include: the Show original output of a spam-foldered message, the timestamp with time zone, the sending IP, the Message-ID, and what you already checked.

Subject: Authenticated mail from {your-domain} lands in Gmail spam

Hello,

Mail from {your-domain} sent from IP {sending-ip} lands in Gmail spam.
SPF, DKIM and DMARC all pass and align (headers attached).
PTR for {sending-ip} resolves to {ptr-name}, and our HELO name matches.
We send over TLS at roughly {messages-per-day} messages per day.

Example message: Message-ID {message-id}, sent {timestamp with time zone}.
Postmaster Tools shows {no data / reputation value}.

What we tried: header review, PTR and TLS check, test to a warm and a
cold recipient. Can you see anything on your side that explains the
filtering, or advise whether a different IP would help?

Thank you,
{your-name}

Common questions

Why does Postmaster Tools show no data for my domain?

Volume to personal Gmail accounts is probably too low. Google says dashboards may omit low-volume domains to protect user privacy. Also check that you verified the domain you actually send from.

Can I get Google to whitelist my IP?

No. Google says it does not accept allowlist requests from email providers, and there is no general channel for individual operators. Your options are to improve reputation over time, ask recipients to mark your mail Not spam, or relay through an established sender.

Should I send staff email through the same relay as application mail?

I would not. Keep person-to-person mail on the real mailbox provider and use the relay for system and bulk messages, so one stream's complaints do not hurt the other.

Will a dedicated IP at the relay solve it faster?

Not by itself. A dedicated IP starts with no history, which is the problem you already have. It makes sense once you send high, steady volume and can ramp slowly.

deliverabilitymailgunsendgridsocketlabs
Share this article
Sohail Hussain

Sohail Hussain

Founder & CEO at Mailneo

Building Mailneo — AI-powered email marketing for growing businesses.

Related Articles

Deliverability

SocketLabs "421 4.5.1 Too many errors" blacklist: how to fix it

`421 4.5.1 Too many errors, you have been temporarily blacklisted` means a SocketLabs server saw repeated auth or bad-address errors from your IP and paused it. Stop whatever is retrying, fix credentials and invalid recipients, clear the queue, and wait. The block usually lifts within minutes, but returns if retries resume.

Sohail Hussain|9 min read
Deliverability

421-4.7.0 Gmail Has Detected This Message Is Suspicious: Fix

The 421-4.7.0 "suspicious due to the nature of the content and/or the links" error means Gmail's content filter rejected your message after DATA, not an authentication check. Remove click tracking or move it to your own domain, drop URL shorteners, check link reputation, then retest with a plain message.

Sohail Hussain|10 min read
Deliverability

550 5.7.515 sending domain authentication level: how to fix it

550 5.7.515 means Outlook.com, Hotmail or Live rejected your message because the sending domain failed SPF, DKIM or DMARC checks. Make SPF and DKIM pass and align with the From domain, add every legitimate sending IP to SPF, publish a DMARC record, and stop sending bulk mail from free-mail addresses.

Sohail Hussain|10 min read
Deliverability

Apollo + Mailgun: "domain not on a Mailgun account" and IMAP

Apollo shows a "domain not being on a Mailgun account" error and asks for an IMAP host because Mailgun is a transactional sending service with no mailboxes. Verify the domain in Mailgun if you send by API; for sequences that need replies, connect a Gmail, Outlook or SMTP+IMAP mailbox instead.

Sohail Hussain|8 min read

Ready to supercharge your email marketing?

Start sending smarter emails with AI-powered campaigns. No credit card required.

Get Started Free