Ubuntu – Forward email from exim to another mail server on different port

eximUbuntu

Exim seems to be very flexible and configurable. What would be the best approach for me to forward an incoming email to exim to another mail server running on a different port like lamson? I am running exim and lamson on the same ubuntu machine.

Thanks heaps.

Best Answer

You need a manualroute router to point to the appropriate transport, where you override the standard port. Something like (untested):

begin routers

lamson_host_relay:
    driver = manualroute
    route_list = * lamson.server.com byname
    transport = lamson_smtp

begin transports

lamson_smtp:
    driver = smtp
    port = 666