Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Exim accepting email on ports 25 and relaying to another server on another port
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Exim accepting email on ports 25 and relaying to another server on another port

chipchip Member

What I'm trying to do is have exim recieve email on ports 25 and then deliver it to another port (not 25) I'm just not sure how to do it? Can anyone point me in the right direction?

Thanks

Joe

Comments

  • jon617jon617 Veteran
    edited November 2020

    To relay all email that comes into exim, open exim.conf

    Go to the section that starts with:
    begin routers

    I have just one entry in that entire section that will match all email, as follows:

    smart_host_relay:
      debug_print = "R: smart_host_relay for $local_part@$domain"
      driver = manualroute
      transport = remote_smtp_smarthost
      route_list = * "<+ smtp.example.com:8788"
      host_find_failed = defer
      no_more
    

    Then, in the begin transports section,

    remote_smtp_smarthost:
      debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
      driver = smtp
      port = 8788
      hosts_require_tls = *
      hosts_require_auth = *
      protocol = smtps
    

    If you have hosts_require_auth required like me, you will need to add something to the begin authenticators section, containing the username and password on the remote smtp server.

    If the port is on the same server, you can drop the hosts_require_tls, hosts_require_auth, protocol = smtps and change the smtp.example.com to localhost.

    Tweak these for something that works for you.

    Thanked by 1chip
  • Thanks for that

    @jon617 said:
    To relay all email that comes into exim, open exim.conf

    Go to the section that starts with:
    begin routers

    I have just one entry in that entire section that will match all email, as follows:

    smart_host_relay:
      debug_print = "R: smart_host_relay for $local_part@$domain"
      driver = manualroute
      transport = remote_smtp_smarthost
      route_list = * "<+ smtp.example.com:8788"
      host_find_failed = defer
      no_more
    

    Then, in the begin transports section,

    remote_smtp_smarthost:
      debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
      driver = smtp
      port = 8788
      hosts_require_tls = *
      hosts_require_auth = *
      protocol = smtps
    

    If you have hosts_require_auth required like me, you will need to add something to the begin authenticators section, containing the username and password on the remote smtp server.

    If the port is on the same server, you can drop the hosts_require_tls, hosts_require_auth, protocol = smtps and change the smtp.example.com to localhost.

    Tweak these for something that works for you.

Sign In or Register to comment.