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.

Exim Experts plz Help - manual routing to remote server

Discussion in 'E-mail Discussions' started by electron33, Jan 25, 2008.

  1. electron33

    electron33 Well-Known Member

    Joined:
    Feb 24, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    16
    One of the domain on my server uses their own mail server. I have put the records in the dns zones and they receive emails from other servers.

    However, when an email is sent from our server e.g. through an enquiry form. Exim won't deliver the mail to the remote server and gives:

    R=virtual_aliases: No Such User Here

    Mind you, no mail users have been set up on our server, since the domain is not using our server for mail anyway.

    Is there any way I can tell to route all emails for that domain to the remote smtp.

    Thanks very much for your help.

    ps.

    OK, I went to Exim advanced config editor and added:

    special:
    driver = manualroute
    transport = remote_smtp
    route_list = domain.com host.com


    (as per exim's faq)
    http://wiki.exim.org/FAQ/Routing_to_remote_hosts/Q0316

    It seemed to work. But now, I don't know how to list more domains and hosts. Do I need to repeat the above for each domain, or can I separate them by comma, etc.
     
    #1 electron33, Jan 25, 2008
    Last edited: Jan 25, 2008
  2. sallen812

    sallen812 Member

    Joined:
    Oct 20, 2005
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem. I dont use the email in WHM/Cpanel. And the same thing is going on with all my domains hosted on the server. A nice work around would be good.
     
  3. electron33

    electron33 Well-Known Member

    Joined:
    Feb 24, 2004
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    16
    This seems to be working for me:

    Add the following to your exim config via WHM:

    OK, I went to Exim advanced config editor and added:

    special:
    driver = manualroute
    transport = remote_smtp
    route_list = domain1.com somesmtp.com; domain2.com somesmtp2.com
     
  4. wp11b

    wp11b Active Member

    Joined:
    Feb 23, 2009
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    how to manual route for spesific email account?
     
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Routing to a "Smart Host" for mail delivery could be setup on a per-domain level as mentioned earlier in this thread; however, I am not sure how feasible or possible it would be to attempt using a smart host for only a single e-mail account. I recommend using a setup that routes on a per-domain basis as this will reduce the complexity involved of an already custom solution. For additional details please reference the following forums post:
    cPanel Forums - View Single Post - Configuring Exim to use a Smart Host
     
  6. wp11b

    wp11b Active Member

    Joined:
    Feb 23, 2009
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    where i must add this section at exim ?

    special:
    driver = manualroute
    transport = remote_smtp
    route_list = domain.com smtp.domain.com
     
  7. Mick71

    Mick71 Registered

    Joined:
    Jan 3, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Here is a way to setup smart hosts for specific email accounts.

    Use the following commands to create a file with the email addresses and smart hosts.

    touch /etc/static_route
    chown root:mail /etc/static_route
    chmod 660 /etc/static_route

    Use vi or pico to edit the /etc/static_route file:

    user1@domain.com: smarthost.domain.com
    user2@domain.com: smarthost.domain.com

    In the advanced exim editor add the following to the first box below the # ROUTERS CONFIGURATION # section.

    static_route:
    driver = manualroute
    transport = remote_smtp
    route_data = ${lookup{$local_part@$domain}lsearch{/etc/static_route}}

    That's it. You can make changes to the /etc/static_route file without having to restart exim.
     
  8. nshreders

    nshreders Member
    PartnerNOC

    Joined:
    May 9, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    chicago, IL
    I needed to relay all remote domains to a central mail server but bypass the local domains and use exim to route that locally.

    smarthost:
    driver = manualroute
    domains = !+local_domains
    transport = remote_smtp
    route_data = "mail.foo.domain.com"

    I had to put the FQDN into /etc/localhosts to get it to work and told exim to lookup how it would route a local domain, and then a remote domain:

    # exim -bt foo@localdomain.com
    fstestc@staging.test.com
    <-- foo@localdomain.com
    router = localuser, transport = local_delivery

    # exim -bt foo@google.com
    foo@google.com
    router = smarthost, transport = remote_smtp
    host mail.foo.domain.com [1.2.3.4]
     
Loading...

Share This Page