Skip to main content

Route all outgoing emails to another cPanel server

Comments

5 comments

  • dalem
    this should work adding to exim advanced editor ------------------------------------------------------------------------ Section: AUTH Smarthost_login: driver = plaintext public_name = LOGIN hide client_send = : somesmtpuser : password Section: ROUTERSTART smarthost: driver = manualroute domains = ! +local_domains transport = smarthost_transport route_list = * hostname.otherserver.com::587 randomize byname host_find_failed = defer no_more Section: TRANSPORTSTART smarthost_transport: driver = smtp hosts = hostname.otherserver.com hosts_require_auth = hostname.otherserver.com hosts_require_tls = hostname.otherserver.com # DKIM Settings dkim_domain = ${lc:$sender_address_domain} dkim_selector = default dkim_private_key = "/var/cpanel/domain_keys/private/${dkim_domain}" dkim_canon = relaxed
    0
  • MaRiOsGR66
    I did try it and immediately I was getting the error: 2020-03-09 13:49:07 1jBGXc-004acz-TM == info@******.gr R=smarthost defer (-30): transport "smarthost_transport" not found in smarthost router 2020-03-09 13:49:07 1jBGnn-004fTl-7x == grammateia@*****.gr R=smarthost defer (-30): transport "smarthost_transport" not found in smarthost router 2020-03-09 13:49:07 1jBGXd-004adC-EY == e*****@*****.com R=smarthost defer (-30): transport "smarthost_transport" not found in smarthost router
    0
  • HostNoc
    Please add following in your exim configuration smarthost_dkim: driver = manualroute domains = !"+local_domains +smart_hosts" condition = "${if eq{${lookup{$sender_address_domain}partial-lsearch{/etc/staticroutes}{$value}}}{}{false}{true}}" ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 headers_add = "${perl{mailtrapheaders}}" require_files = "+/var/cpanel/domain_keys/private/${sender_address_domain}" transport = remote_smtp_smart_dkim route_list = !+local_domains "${lookup{$sender_address_domain}partial-lsearch{/etc/staticroutes}}" smarthost_regular: driver = manualroute domains = !"+local_domains +smart_hosts" condition = "${if eq{${lookup{$sender_address_domain}partial-lsearch{/etc/staticroutes}{$value}}}{}{false}{true}}" ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 headers_add = "${perl{mailtrapheaders}}" transport = remote_smtp_smart_regular route_list = !+local_domains "${lookup{$sender_address_domain}partial-lsearch{/etc/staticroutes}}" #TRANSPORTSTART sendbysmarthoststransport: driver = smtp port = ${extract{port}{${lookup{$sender_address_domain}lsearch{/etc/exim_smarthosts}}}} hosts_require_auth = $host_address remote_smtp_smart_dkim: driver = smtp #hosts_require_tls = * interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}} helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}} dkim_domain = $sender_address_domain dkim_selector = default dkim_private_key = "/var/cpanel/domain_keys/private/${dkim_domain}" dkim_canon = relaxed remote_smtp_smart_regular: driver = smtp #hosts_require_tls = * interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}} helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}} If you still having issue then please share your exim configuration
    0
  • dalem
    had a typo in smarthost_transport: corrected in post above to fix "smarthost_transport" not found" tested on one of my own servers & works
    0
  • dalem
    Updated Added DKIM to Section: TRANSPORTSTART to pass dkim Dont forget to add SPF Note: we use this config on Our servers it works without issue Note: you may need to tweak your settings Note: had to modify Section: TRANSPORTSTART to pass dkim our mail server is stand alone ( no cpanel) & the dkim is passed from there so insure that it passess it correctly make mods as necesssary
    0

Please sign in to leave a comment.