Technical guide

Google Workspace Email Security: Gateway Routing and Setup

Plan an incoming SMTP security gateway for Gmail while retaining your Google Workspace mailboxes and reviewing authentication and delivery behavior.

Published · Updated · 4 min read · SecuraWall team, Doz Teknoloji

Google Workspace E-posta Güvenliği: Ağ Geçidi Kurulumu (TR)

Keep Gmail as the mailbox platform

Google Workspace email security can use an inbound SMTP gateway before Gmail. SecuraWall Email Security applies configured spam, antivirus, phishing, attachment and quarantine controls on that route. Supported QR/OCR and BEC checks add signals within their documented limits. Backup MX only queues and forwards mail received through its secondary route. This is deployment guidance, not a claim that your Workspace configuration has been tested or automatically integrated.

Record the receiving route before updating DNS

Identify and verify the Google receiving destination appropriate for your domain and routing design. Save it as the separate manual delivery target in SecuraWall before making SecuraWall the only published MX for Email Security. Do not point delivery back to the protected domain MX after that change. Keep the original DNS and Gmail routing settings so you can reverse a planned migration safely.

Review Gmail inbound gateway settings

Google Admin provides Inbound gateway settings under Apps, Google Workspace, Gmail, Spam, Phishing and Malware. Review public gateway IPs, external-source detection and TLS requirements against the current Google instructions. Gateway configuration affects how Gmail evaluates message authentication; Google notes that sender DMARC policy is not enforced for messages arriving from the inbound gateway, although authentication signals still inform evaluation. Review this behavior explicitly rather than assuming the original direct-delivery checks are unchanged.

Restrict direct delivery only after route testing

The optional Gmail setting that rejects mail not coming from gateway IPs needs a deliberate scope review. Check the domains and other sending paths affected before enabling it. Do not apply it indiscriminately to Backup MX, where the primary route must remain usable. Incoming forwarding and authenticated outgoing relay are different operations. SMTP Relay requires a separate add-on and approved sending setup; this guide does not configure a Google outbound connector.

Verify outcomes and separate user provisioning

Send a controlled message to a mailbox you own and compare the SecuraWall queue and scan records with Google delivery logs and actual mailbox receipt. Review authentication results, quarantine and destination errors. A 220 greeting only proves SMTP reachability, while a remote 250 response still does not prove inbox placement. The gateway does not create Gmail mailboxes or aliases. Manual and CSV quarantine access can coexist with the separately configured Google Workspace quarantine user connector. Google Directory synchronization and Continue with Google require an authorized Directory connections setup; this SMTP routing guide does not grant OAuth mailbox-content access.

Receiving firewall and source authorization

For incoming Backup MX or Email Security delivery, permit the approved SecuraWall public source IPv4 and IPv6 addresses to the receiving SMTP endpoint and configured port. SMTP Relay alone is outbound and does not require opening an incoming mail port. For Backup MX, preserve the normal primary route. The SecuraWall portal shows the published source addresses and the platform-specific receiving steps for your domain.

Receiving platform configuration

Google Admin > Apps > Google Workspace > Gmail > Spam, phishing and malware > Inbound gateway: enter every approved SecuraWall public source IPv4 and IPv6 address used for this route in Gateway IPs. A Gmail email allowlist entry is not a replacement.

Address-family and relay scope

Enable Automatically detect external IP and keep Gmail spam evaluation enabled. For Email Security, apply Reject all mail not from gateway IPs only after checking organizational scope and all legitimate routes. Do not block the normal primary route for Backup MX.

Source attribution and verification

A 421 4.7.0 IP not in whitelist for RCPT domain response is a gateway authorization failure, not evidence that the mailbox is missing. Check IPv4 and IPv6 separately, then test a known mailbox and a deliberately missing recipient.

References

Protect your domain this week.

No commitment, no auto-renewal. One MX change to start; to leave, point your MX back.

Multi-layer email security with dual-layer AI, monthly per domain.

Protect your domain
Technical support