Setup remote spam filtering on in Exim
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"
-
Hello :) Thank you for taking the time to write this guide. I've moved this thread to our "Workarounds" forum. 0
Please sign in to leave a comment.
Comments
1 comment