touch /etc/staticroutes
pico /etc/staticroutes
domainname.com: target.mail.server
static_route:
driver = manualroute
transport = remote_smtp
route_data = ${lookup{$domain}lsearch{/etc/staticroutes}}
projectandrew said:Just cracked it - spent the afternoon trawling around google, and finally pieced together this solution - a quick how-to:
1. Type the following when logged in via SSH
etc etcCode:touch /etc/staticroutes pico /etc/staticroutes
smart_route:
driver = manualroute
route_data = ${lookup{$domain}lsearch{/etc/staticroutes}}
transport = remote_smtp_smart
remote_smtp_smart:
driver = smtp
port = 6625
hosts = ${lookup{$domain}lsearch{/etc/staticroutes}}
hosts_override
smart_route:
driver = manualroute
route_data = ${lookup{$domain}lsearch{/etc/staticroutes}}
transport = remote_smtp_smart
remote_smtp_smart:
driver = smtp
port = 6625
hosts = ${lookup{$domain}lsearch{/etc/staticroutes}}
hosts_override
static_route:
driver = manualroute
transport = remote_smtp
route_data = ${lookup{$domain}lsearch{/etc/staticroutes}}
How do I specify all domains? (talking about point number 2)projectandrew said:Just cracked it - spent the afternoon trawling around google, and finally pieced together this solution - a quick how-to:
1. Type the following when logged in via SSH
2. Add entries in the format:Code:touch /etc/staticroutes pico /etc/staticroutes
3. Press CTRL-O to save the file, then CTRL-X to exit the pico editor.Code:domainname.com: target.mail.server
4. In WHM, under 'Service Configuration' choose 'Exim Configuration Editor', then click 'Switch to Advanced Editor'.
5. Scroll down to the 'ROUTERS CONFIGURATION' section, and in the white space underneath, add the following:
6. Scroll to the bottom of the page and click 'Save' - Exim will automatically restart.Code:static_route: driver = manualroute transport = remote_smtp route_data = ${lookup{$domain}lsearch{/etc/staticroutes}}
Well chuffed, since I can now route mail for some of my customers domains, once they've been scanned for viruses and spam on my cpanel servers (I use the RVSKin virus/spam solution/howto), to their Exchange servers...