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.

Relay a domain to a second mail server

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

  1. Silent Ninja

    Silent Ninja Well-Known Member

    Joined:
    Apr 18, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    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 ?
     
  2. Silent Ninja

    Silent Ninja Well-Known Member

    Joined:
    Apr 18, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    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).
     
Loading...

Share This Page