The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Use remote smpt server

Discussion in 'E-mail Discussions' started by gersonfs, Feb 9, 2012.

  1. gersonfs

    gersonfs Active Member

    Joined:
    Sep 30, 2007
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Hello!

    How can I configure exim to use a remote smpt server for sending e-mails?
    I ask because we are having problems with hotmail and yahoo, we are in a blacklist them. So I would like to authenticate with that problematic server, but use another server for sending messages, how to do this?

    Sorry my bad english!

    Thanks!
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You would likely want to use a smart host router to route the emails:

    Mailing List Archive: Router/Transport Problem with multiple entries

    You'd need to create a file called /etc/staticroutes with the following:

    Code:
    domain1.com: IP#
    domain2.com: IP#
    domain3.com: IP#
    and so on
    Or, the following in the file:

    Code:
    domain1.com: mail.location1.com (the MX record pointing to the off site server)
    domain2.com: mail.location1.com (the MX record pointing to the off site server)
    domain3.com: mail.location1.com (the MX record pointing to the off site server)
    and so on
    Next, you would need to go to WHM > Exim Configuration Editor > Advanced Editor and locate the routers area there, then put this into that routers box:

    Code:
    static_route:
    driver = manualroute
    transport = remote_smtp_smart
    route_data = ${lookup{$domain}lsearch{/etc/staticroutes}}
    At that point, you'd then locate the transports section in the Advanced Editor for exim and place the following:

    Code:
    remote_smtp_smart:
    driver = smtp
    port = 25
    delay_after_cutoff = false
    hosts = ${lookup{$domain}lsearch{/etc/staticroutes}}
    hosts_override
    Save that area, then test sending an email as one of the domains to see the results.
     
Loading...

Share This Page