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.

How to use CPanel Advanced Exim editor?

Discussion in 'General Discussion' started by jeffschips, Jun 27, 2016.

  1. jeffschips

    jeffschips Member

    Joined:
    Jun 5, 2016
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    new york
    cPanel Access Level:
    Root Administrator
    I am going dumb trying to figure out how to actually use the CPanel Exim Advanced Editor. None of it makes sense. Let's say I want to introduce an "ignore_target_hosts" into the dnslookup with these parameters:
    ignore_target_hosts = !192.168.3.0/24 : 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
    172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16

    This would normally be done in the dnslookup section - but where is that? And, once you find it how do you edit it? It seems there are editing boxes near the sections to which they apply, and, additionally, it's impossible to tell if those editing boxes apply to the information above them or below them. Really crazy bad design with no instructions or how-to's anywhere.

    Can some please explain in plain English how to actually edit the exim.conf file using the advanced editor?

    Thank you!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know the specific section of the /etc/exim.conf file you are attempting to edit? For instance, here's one example:

    Code:
    #
    # Lookup host router for remote smtp and ignores verisign site finder 'service'
    #
    
    
    lookuphost:
        driver = dnslookup
        domains = ! +local_domains
        #ignore verisign to prevent waste of bandwidth
        ignore_target_hosts = +loopback : 64.94.110.0/24
        headers_add = "${perl{mailtrapheaders}}"
        transport = remote_smtp

    Thank you.
     
  3. jeffschips

    jeffschips Member

    Joined:
    Jun 5, 2016
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    new york
    cPanel Access Level:
    Root Administrator
    Thanks for helping out. That's just it - I don't know where I am supposed to put this. No documentation to give me a clue. I know that I want to "ignore_target_hosts" meaning I don't want email ever sent to the list of IPs in the list.

    Where does one put that?

    How does one put that?

    How does one even begin to understand how to use the advanced editor.

    I would welcome any example -- but preferably mine -- of how to insert new values into the exim.conf using the cpanel advance editor.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    The following URLs should provide you with some additional background information on this topic:

    Q0321 · Exim/exim Wiki · GitHub
    Q0319 · Exim/exim Wiki · GitHub
    7. The default configuration file

    Once you have accessed the "Advanced Editor", search the page for:

    "Section: ROUTERSTART"

    Then, paste your custom router into this field. Here's an example:

    Code:
    my_remote_smtp:
      driver = dnslookup
      ignore_target_hosts = 10.1.1.1
      transport = remote_smtp
    Next, you simply scroll to the bottom to save the changes.

    Thank you.
     
  5. jeffschips

    jeffschips Member

    Joined:
    Jun 5, 2016
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    new york
    cPanel Access Level:
    Root Administrator
    Okay, that is a great start for me. In the past when I've input data into the code blocks, it isn't accepted. So my question is: does properly formatted code (which mine may not have been) append, pre-prend or replace any given set of code that is already there?

    For example the sample code above was accepted by the editor. Now if I want input yet another set of code that goes under the routerstart section, would I append it or prepend it to the existing code block? Note: when I go into the editor after I have made the suggested sample change, above, and click save, I can see in the exim.conf that indeed the code has been accepted, yet the code remains in the editor box upon returning to the advanced editor.

    thank you
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    In this case, you would add the additional entry to "Section: ROUTERSTART" below or above the first entry. EX:

    Code:
    # Custom Router 1
    my_first_remote_smtp:
      driver = dnslookup
      ignore_target_hosts = 10.1.1.1
      transport = remote_smtp
    
    # Custom Router 2
    my_second_remote_smtp:
      driver = dnslookup
      ignore_target_hosts = 10.1.1.2
      transport = remote_smtp
    The order is sometimes important if you are adding rules that stop the message processing before proceeding to the next rule. You may find the following document helpful as well:

    Exim Configuration Manager - Advanced Editor

    Thank you.
     
Loading...

Share This Page