A user reports their mail to a @gmail.com recipient bounced. The bounce body contains 550-5.7.1 followed by a Google support URL. Same domain reaches Outlook and Yahoo without issue, so the impulse is to blame Gmail. The bounce code is precise — it tells you exactly which policy rejected the message — and the fix on your end is usually small and durable.
What’s happening
550-5.7.1 is Gmail’s authentication-and-policy rejection code. The trailing text after the code matters: it identifies whether the rejection is for missing SPF/DKIM, for an SPF or DKIM that does not align with the From: domain (DMARC alignment failure), for sending from an IP with no rDNS or poor reputation, or for the bulk-sender requirements Gmail enforces on senders to gmail.com.
cPanel defaults give you SPF on the managed domain and DKIM if the admin enabled it. They do not configure DMARC, do not align the SPF return-path when mail goes through a relay, and do not add the List-Unsubscribe headers Gmail now requires for bulk senders.
How to verify
Read the actual bounce body. The Exim bounce contains the full remote response — the verbatim Gmail text identifies the failure:
grep "550-5.7.1" /var/log/exim_mainlog | tail -20
Then check what Gmail sees for the From: domain:
dig +short TXT example.com | grep -i spf
dig +short TXT default._domainkey.example.com
dig +short TXT _dmarc.example.com
Send a test from cPanel webmail to a Gmail account you control, then in Gmail click “Show original.” Look at the Authentication-Results header: spf=pass, dkim=pass, and dmarc=pass should all be present. Any fail or softfail is the rejection cause.
The fix
- Publish a working SPF record that lists the actual sending host (
v=spf1 +a +mx +ip4:<server-ip> ~all— narrow it, don’t include third parties you don’t use). - Enable DKIM in WHM > Email Deliverability for every domain on the server, and confirm the public key is published.
- Publish a DMARC record starting at
p=none(v=DMARC1; p=none; rua=mailto:dmarc@example.com). Monitor reports for two weeks, then move top=quarantine. - Confirm rDNS on the sending IP resolves to a hostname you control, and that hostname has a matching forward A record.
- If you send any newsletter traffic from the same server, add
List-UnsubscribeandList-Unsubscribe-Postheaders to those messages — Gmail’s bulk thresholds apply per sending domain.
Once the three auth records align, Gmail stops bouncing. The DMARC report stream is what tells you it is staying fixed.
Stack Harbor sets up mail authentication and DMARC monitoring as part of Deployment Management. If you need this dialled in across multiple domains, talk to us.