Setup

Setup guide

Everything you need to put Spambil in front of your existing mail system. The basic setup takes about 5 minutes; Microsoft 365 and Google Workspace need a few extra recommended settings.

Last updated: 26 September 2026

1. Basic steps (every mail system)

  1. Sign up and add your domain. In the Mail server field, enter the server mail should be delivered to (see below for your platform).
  2. In your DNS, add two MX records and delete the old MX records:
    MXspam1.jusbil.compriority 10
    MXmx1.spambil.compriority 20
  3. If your mail server's firewall restricts inbound SMTP (port 25), allow the Spambil gateway IP: 2.59.119.137.
  4. In the panel, click "Test MX record". DNS propagation usually takes 5–30 minutes.

You don't need to change your SPF record: Spambil filters inbound mail only, and your outgoing mail keeps leaving from your own server.

2. Microsoft 365 (Exchange Online)

In the Mail server field, enter your tenant's MX target. You'll find it in the Microsoft 365 admin center → Settings → Domains → your domain → DNS records; it usually looks like yourcompany-com.mail.protection.outlook.com.

a) Create an inbound connector

  1. Exchange admin center (admin.exchange.microsoft.com) → Mail flow → Connectors → Add a connector.
  2. Connection from: Partner organization, to: Office 365. Name: Spambil inbound.
  3. Authentication: choose "By verifying that the IP address of the sending server matches…" and add 2.59.119.137.
  4. Optional: tick "Reject email messages if they aren't sent over TLS". Save.

b) Turn on Enhanced Filtering for Connectors (important)

Because mail now reaches Microsoft through Spambil, Microsoft's own filtering (EOP/Defender) would otherwise see Spambil instead of the real sender. Enhanced Filtering fixes that, so SPF, DKIM and DMARC are evaluated against the real sender.

  1. Microsoft Defender portal (security.microsoft.com) → Email & collaboration → Policies & rules → Threat policies → Enhanced filtering.
  2. Select the Spambil inbound connector → "Automatically detect and skip the last IP address" → apply to all recipients → save.

Don't create a mail flow rule that sets SCL -1 for all mail; Microsoft recommends Enhanced Filtering instead.

c) Block direct delivery (optional hardening)

Once mail flow works, you can make Exchange Online accept mail only from Spambil, so attackers can't bypass filtering by sending straight to your tenant. In Exchange Online PowerShell:

Set-InboundConnector "Spambil inbound" -SenderDomains * -RestrictDomainsToIPAddresses $true

Careful: after this, any other service that delivers directly to your tenant (another filter, a scanner, an app) will be rejected. Make sure there is none first.

3. Google Workspace (Gmail)

In the Mail server field, enter smtp.google.com (Google's current MX target).

  1. Google Admin console → Apps → Google Workspace → Gmail → Spam, phishing and malware → Inbound gateway.
  2. Add 2.59.119.137 to the gateway IPs.
  3. Tick "Automatically detect external IP" (recommended, so Gmail evaluates the real sender).
  4. Optional: "Require TLS for connections from the email gateways listed above".
  5. Optional, after verifying mail flow: "Reject all mail not from gateway IPs". The same caution as the Microsoft 365 hardening applies.
  6. Save; changes can take from a few minutes to a few hours to apply.

4. cPanel / WHM

  1. In the Mail server field, enter your server name (e.g. mail.yourcompany.com or the server hostname).
  2. In cPanel → Email Routing, choose Local Mail Exchanger. Otherwise, because the MX points elsewhere, cPanel may stop accepting your domain's mail locally.
  3. Add the MX records (in cPanel's Zone Editor, or wherever your DNS is hosted).

5. Plesk

  1. In the Mail server field, enter your server name.
  2. Make sure mail service is enabled for the domain; no other Plesk setting is needed.
  3. Update the MX records wherever your DNS is hosted.

6. Exchange (on-premises), Zimbra and other servers

Enter the name your server receives internet mail on in the Mail server field, and allow inbound SMTP connections from 2.59.119.137 in your firewall. Optionally, once mail flow is verified, restrict port 25 to this IP only.

Rolling back

To stop using Spambil or bypass it in an emergency: 1) if you blocked direct delivery in Microsoft 365, reopen it first with Set-InboundConnector "Spambil inbound" -RestrictDomainsToIPAddresses $false; in Google Workspace, turn off "reject all mail not from gateway IPs". 2) Point your MX records back to their old values. 3) Optionally remove the connector / inbound gateway setting. Details: Security and infrastructure.

Stuck on a step? Email info@spambil.com or call +90 850 242 16 23 and we'll help you set it up.