Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Relay a domain to a second mail server

Discussion in 'E-mail Discussion' started by Silent Ninja, Jul 31, 2009.

  1. Silent Ninja

    Silent Ninja Well-Known Member

    Joined:
    Apr 18, 2006
    Messages:
    199
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Buenos Aires, Argentina
    First: This is my actual situation...

    An ISP is blocking our webserver ip range on their mailservers, not sure why, and also they refuse to unlock us; anyhow, we still need to send emails to them.

    We've figured out that all the emails going to @ispaddress.com should pass via another cpanel webserver of ours via relay (this one isn't blocked) and thus the mails will be delivered correctly.

    I've seen something about ACL's and relay_hosts or transports, but I haven't been able to find a config that actually works on cPanel and that was easy for me to edit it so that just @ispaddress.com emails get's routed by the another smtp server and all the other mails get's delivered normally.

    Could you help me with this setup ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Silent Ninja

    Silent Ninja Well-Known Member

    Joined:
    Apr 18, 2006
    Messages:
    199
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Buenos Aires, Argentina
    Fixed with this guide:
    Exim with a remote SMTP server - ArchWiki

    Not as simple as it looks but kinda
    On the first editable block on Advanced Exim Editors, add this:
    Code:
    domainlist blocked_me_domains = lsearch;/etc/blockedmedomains
    Obviously you'll have to put all your domains blocked on "/etc/blockedmedomains" (one per line on the file).

    Then add this after the editable box right after the "# Demo Safety Router":
    Code:
    to_myothersmtp:
      driver = manualroute
      domains = +blocked_me_domains
      transport = remote_smtp
      route_list = * your.smtphostname.here
    Obviously editting where it says: "your.smtphostname.here" and allowing to relay on that smtp (you may whitelist yourself to make it faster).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice