How do I Use Merak as my AntiSpam and AntiVirus Gateway for MS Exchange Server?

Why do I want to do this?

  • To lose the direct connection of MS Exchange Server (Exchange) to the Internet, affording greater security
  • You use Merak's excellent AntiVirus protection
  • You use Merak's excellent AntiSpam protection

How does it work?

Your Exchange configuration probably looks something like the following diagram

Merak as GateWay - General Network Configuration

Source: Troup, Marty: Merak Instant Antispam as automated spam protection gateway for Microsoft Exchange; 2003; marty@icewarp.us

Your Exchange is connected directly to the Internet and has to deal with all the unsolicited incoming traffic.

To use Merak as an AntiVirus/AntiSpam Gateway, you should reconfigure your setup to look something like this:

Merak as GateWay - Network Configuration with Merak

Source: Troup, Marty: Merak Instant Antispam as automated spam protection gateway for Microsoft Exchange; 2003; marty@icewarp.us

The Merak server is placed between the Exchange Server and the internet and Merak's Rich Filtering features can be applied to all your incoming messages, offering effective protection for your Exchange Server.

To Set Merak to be a Relay Server for Exchange you should proceed as follows?

  1. Check Merak's DNS servers

    In Merak's Config go to Mail Service -> SMTP Service -> General tab and check that Use DNS Lookup is selected

    SMTP Server - General Tab

  2. Stop any unnecessary services, such as POP3/IMAP, IM (Instant Messaging), Calendaring, FTP etc. in System -> Services.
  3. Setup AntiVirus

    Go to Anti-Virus menu node.

    Check Active option to enable Integrated AntiVirus.

    Antivirus Tab - Integrated Antivirus Section

    Set Merak's AntiVirus settings to suit your requirements. Full details of AntiVirus settings can be found in the Administration manual.

  4. Set the Update Schedule to automate Antivirus DB updates.

    Antivirus Tab - Updates Schedule Section

  5. Setup Merak Instant AntiSpam (MIAS)

    Go to Anti-Spam menu node and enable Instant the AntiSpam Engine.

    General Tab - General Section

    Configure Merak's AntiSpam engine and rules as per your requirements

    This includes Content Filters, Intrusion Prevention, Black & White Lists, Static Filters and many others.

    For full information please refer to the MIAS documentation.

  6. Set up Domains in Merak corresponding to Domains which are Handled by Exchange

    In Domains & Accounts -> Management, create a new Domain with the same name as it has on Exchange.

    Set the Domain type to Backup domain

    Set the Value: option to the IP address or hostname of the server where the Exchange domain is running.

    Gateway - Backup domain

    Click Save to save the domain settings.

    Repeat this procedure for all your domains.

  7. Setup DNS Records to Contain Relay Host
    • Add an A record to associate the IP address of the Merak Server with its hostname.
    • Add an MX record to associate the domain name with the hostname/IP of the Merak Server. This MX record should be set with a higher priority than the MX record for the Exchange Server.
    • Repeat this procedure for all your domains.

Once this is set up correctly, all incoming messages will be

  • routed to the Merak Server
  • be analysed for Spam
  • be analysed for Viruses
  • be actioned as per your settings (deleted, quarantined etc.)
  • and all "clean" messages will be passed to your Exchange Server