The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setup remote spam filtering on in Exim

Discussion in 'Workarounds and Optimization' started by holodyn, Jun 16, 2015.

  1. holodyn

    holodyn Registered

    Joined:
    Feb 6, 2008
    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    1
    We fight with this every time, so this is as much being shared as is place for us to reference this in the future.

    These instructions will guide you through the configuration of a server to support remote spam filtering for selective clients. These instructions assume root access to the server, and the use of Exim mail handler.

    In our shared hosting environments we use the following to setup SpamTitan, however this should work for any similar configuration requirement.


    ----------------------------------------------------------------------------------------------------------------------------------------
    Step 1: Setup Remote Handler
    ----------------------------------------------------------------------------------------------------------------------------------------

    Setup Spamtitan
    Add domain under Settings > Relay Settings (one for each domain)
    Add user login under Anti-Spam Engine > Admins (one for each domain - Domain Administrator - Full Access)

    DNS Setup MX Records for DNS
    Remove Old MX
    domain.com. - 14400 - IN - MX - 0 - domain.com.
    Add New MX
    domain.com. - 14400 - IN - MX - 0 - cloud1.spamtitan.com.
    domain.com. - 14400 - IN - MX - 10 - cloud2.spamtitan.com.
    Set Email Routing option to
    "Local Mail Exchanger"

    Testing the server is forwarding (before Step 2)
    Send email from Gmail to Server - once received should have spam titan in header

    Testing that Server is Blocking direct email (after Step 2)
    wormly.com/test_smtp_server
    cloud1.spamtitan.com (should work)
    mail.yourserver.com (should block)

    ----------------------------------------------------------------------------------------------------------------------------------------
    Step 2: For Single Domain on Server using SpamTitan (Option A)
    ----------------------------------------------------------------------------------------------------------------------------------------

    sant-media.co.uk/2010/03/how-to-configure-exim-to-receive-email-for-domain-only-from-specific-ip-addresses/

    Adding new client to existing setup
    Add new client domain to the domainlist file
    /etc/exim/spamtitan_domainlist
    Restart Exim
    Done!

    Creating SpamTitan Exim Setup for the First Time
    Create Client Rule Files
    /etc/exim/spamtitan_domainlist
    account-website.com
    /etc/exim/spamtitan_hostlist
    localhost
    *.yourserver.com
    *.spamtitan.com

    Add Rules in Exim Advanced Editor
    Add Setting - domainlist
    domainlist spamtitan_domainlist
    lsearch;/etc/exim/spamtitan_domainlist
    Add Setting - hostlist
    hostlist spamtitan_hostlist = /etc/exim/spamtitan_hostlist : /etc/localdomains : net-iplsearch;/etc/relayhosts
    Add Code in Section: custom_end_recipient
    deny
    !authenticated = *
    !hosts = +spamtitan_hostlist
    domains = +spamtitan_domainlist
    log_message = "SpamTitan Relay Block from $sender_fullhost"
    message = "Please use the proper domain MX record"
     
    #1 holodyn, Jun 16, 2015
    Last edited by a moderator: Jun 16, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...
Similar Threads - Setup remote spam
  1. Rogger Shaw
    Replies:
    2
    Views:
    406

Share This Page