CPanel Help and Knowledgebase
Search:     Advanced search
Browse by category:
Contact Us


We are moving to new location!!!

seat-timetable

Exim Ignore MX Record

Add comment
Views: 940
Votes: 0
Comments: 0
Posted: 11 Mar, 2008
by: Soumplis A.
Updated: 11 Mar, 2008
by: Soumplis A.

There are some cases where you want to ignore the configured MX record in order to deliver e-mails for a domain and instead deliver them to a preconfigured server. A very common situation where you want to do this is when you provide advanced antivirus and antispam solutions to your clients. In those cases you want any mail delivered for a domain to be forwarded to you advancev antivirus/antispam server. Below we will show you how to do this and forward any mail for cphelp.gr and all it's subdomains to the server superantispam.cphelp.gr instead of the MX record that shows mail.cphelp.gr.

  1. Login to your server through ssh.
  2. Create the file /etc/hubbed_hosts .
  3. Insert the following line to that file (the first column is the domain to forward and the second column the MTA to forward the domain):

    # Domain      MTA
    *.cphelp.gr     superantispam.cphelp.gr
  4. Save the file and exit SSH.
  5. Login to WHM.
  6. Under "Service Configuration" click on "Exim Configuration Editor".
  7. Click on "Advance Editor"
  8. Find the config section "ROUTERS CONFIGURATION".
  9. Enter the following lines in the first text box:

       hubbed_hosts:
         driver = manualroute
         domains = "${if exists{/etc/hubbed_hosts}\
                   {partial-lsearch;/etc/hubbed_hosts}\
                   fail}"
        
         route_data = ${lookup{$domain}partial-lsearch{/etc/hubbed_hosts}}
         transport = remote_smtp
  10. Save the configuration and wait for exim to restart.
  11. Test you new exim configuration.
Also read
document Spamassasin Enable/Disable through SSH
document Mail Queue Count
document Force Mail Dequeue
document Mail Mass Delete
document Upgrade ClamAV to latest version

Others in this Category
document Spamassasin Enable/Disable through SSH
document Mail Queue Count
document Force Mail Dequeue
document Mail Mass Delete
document Bandwidth Meter Status
document Transfer account fails with "Timeout during ssh session"
document Addon domain Mail Account "Login Failed"
document MySQL Usage Limit
document Clean /tmp from old session files
document Upgrade ClamAV to latest version



RSS