Technical guide

Exchange Server Spam Filter: Protect It With a Gateway

Spam filtering for on-premises Exchange Server: limits of the built-in agents, a gateway in front, receive connector scope, internal SMTP servers, continuity.

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

Exchange Server Spam Filtresi: Ağ Geçidiyle Koruma (TR)

An on-premises Exchange Server that faces the Internet directly is a target for spam and attacks alike. Its built-in anti-spam agents give basic protection but fall short against current phishing, QR-code attacks and CEO fraud. The strongest setup puts an email security gateway in front of Exchange.

Why protect Exchange from the front?

  • Exchange servers have been targeted through serious vulnerabilities; reducing what faces the Internet lowers the risk.
  • Support for Exchange Server 2016 and 2019 ended on 14 October 2025. The supported version is Exchange Server Subscription Edition (SE); a gateway in front adds defence while you plan the upgrade.
  • The built-in agents offer no click-time link checks, QR-code reading, user quarantine or BEC detection.
  • During maintenance or a failure, incoming mail waits in the gateway's queue.

Set-up steps

  1. Add your domain at SecuraWall and verify it with a TXT record.
  2. Save the public address and SMTP port of your Exchange server (or the Edge or publishing device in front of it) as the delivery target.
  3. Limit the remote IP ranges of the Receive Connector that accepts Internet mail to SecuraWall's addresses, so the gateway cannot be bypassed.
  4. Add SecuraWall's addresses as internal SMTP servers, so Exchange evaluates the original sender instead of the gateway.
  5. Confirm delivery with a controlled test message, then point the MX record to SecuraWall.
  6. Add quarantine users from Active Directory with the directory connector in the portal.

Example PowerShell (replace the addresses with the current list in the portal and note the existing values first):

Get-ReceiveConnector "EXCH01\Default Frontend EXCH01" | Format-List RemoteIPRanges
Set-TransportConfig -InternalSMTPServers @{Add="198.51.100.10","2001:db8::10"}

Before narrowing the connector's IP range, check whether printers, applications or other servers use the same connector; give them their own connector if needed.

What about Exchange's own filter?

If Exchange's anti-spam agents re-check DKIM and DMARC behind the gateway, signatures broken by the warning banner or link rewriting can send legitimate mail to junk. Listing the gateway as an internal SMTP server prevents most of this; still, watch the junk folders in the first weeks.

Recipients that do not exist

SecuraWall Email Security can refuse mail for addresses that do not exist before it reaches your server. This cuts needless non-delivery reports from Exchange and the spam load.

Frequently asked questions

Does Exchange Online Protection (EOP) protect on-premises Exchange?

EOP is Microsoft's cloud service and needs its own subscription and configuration. SecuraWall works as an independent gateway in front of on-premises Exchange.

What happens to my mail during Exchange maintenance?

SecuraWall keeps it queued for up to 14 days and delivers it when your server is back, retrying every 3 minutes.

Does it work with hybrid Exchange?

Yes, but mail flow is split between Microsoft 365 and on-premises, so the design needs care. Talk to one of our experts first.

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