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!

Exim Configuration Editor

Discussion in 'E-mail Discussion' started by vikins, Apr 10, 2015.

  1. vikins

    vikins Well-Known Member

    Joined:
    Oct 3, 2006
    Messages:
    107
    Likes Received:
    1
    Trophy Points:
    168
    I've been using this method of editing /etc/exim.conf for a long time. We now how the Advanced Exim Configuration editor available in WHM. I see this section in there, but it does not seem to be editable. Can anybody comment if there is a way to make the above change through the editor so that it will be preserved during exim updates and rebuilds?

    Thank you.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The following post from another analyst might help:

    Code:
    The X-AntiAbuse headers are added by the following in the routers in exim:
    
    headers_add = "${perl{mailtrapheaders}}"
    
    I was able to remove these headers in testing,  but this required basically a complete re-write of Section: POSTMAILCOUNT in Exim's advanced editor as the editor does not let you easily edit these default routers.
    
    Basically,  I copied the whole section,  renamed the routers,  commented out the headers_add lines here and pasted the whole lot into the POSTMAILCOUNT input window in Exim advanced editor.
    
    ---------------------
    #
    # Lookup host router for remote smtp and ignores verisign site finder 'service'
    # and uses domain keys
    # This matches lookup exactly except we look for X-Boxtrapper: so we can determine
    # what is a boxtrapper generated message in the log.  Note: there is nothing to
    # prevent X-Boxtrapper from being added to non-boxtrapper messages so this is for
    # logging reasons only
    #
    boxtrapper_verify_dkim_lookuphost_new:
        driver = dnslookup
        domains = ! +local_domains
        condition = "${if eq {$h_X-Boxtrapper:}{}{0}{1}}"
        #ignore verisign to prevent waste of bandwidth
        ignore_target_hosts = +loopback : 64.94.110.0/24
        require_files = "+/var/cpanel/domain_keys/private/${sender_address_domain}"
    #    headers_add = "${perl{mailtrapheaders}}"
        transport = dkim_remote_smtp
    
    #
    # Lookup host router for remote smtp and ignores verisign site finder 'service' and uses domain keys
    #
    
    
    dkim_lookuphost_new:
        driver = dnslookup
        domains = ! +local_domains
        #ignore verisign to prevent waste of bandwidth
        ignore_target_hosts = +loopback : 64.94.110.0/24
        require_files = "+/var/cpanel/domain_keys/private/${sender_address_domain}"
    #    headers_add = "${perl{mailtrapheaders}}"
        transport = dkim_remote_smtp
    
    #
    # Lookup host router for remote smtp and ignores verisign site finder 'service'
    # This matches lookup exactly except we look for X-Boxtrapper: so we can determine
    # what is a boxtrapper generated message in the log.  Note: there is nothing to
    # prevent X-Boxtrapper from being added to non-boxtrapper messages so this is for
    # logging reasons only
    #
    
    
    boxtrapper_verify_lookuphost_new:
        driver = dnslookup
        domains = ! +local_domains
        condition = "${if eq {$h_X-Boxtrapper:}{}{0}{1}}"
        #ignore verisign to prevent waste of bandwidth
        ignore_target_hosts = +loopback : 64.94.110.0/24
    #    headers_add = "${perl{mailtrapheaders}}"
        transport = remote_smtp
    
    #
    # Lookup host router for remote smtp and ignores verisign site finder 'service'
    #
    
    
    lookuphost_new:
        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
    
    
    # This router routes to remote hosts over SMTP by explicit IP address,
    # given as a "domain literal" in the form [nnn.nnn.nnn.nnn]. The RFCs
    # require this facility, which is why it is enabled by default in Exim.
    # If you want to lock it out, set forbid_domain_literals in the main
    # configuration section above.
    
    
    #
    # Literal Transports .. ignores verisigns sitefinder service
    #
    
    literal_new:
        driver = ipliteral
        domains = ! +local_domains
    #    headers_add = "${perl{mailtrapheaders}}"
        ignore_target_hosts = +loopback : 64.94.110.0/24
        transport = remote_smtp
    -------------------
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. thealien

    thealien Registered

    Joined:
    Apr 1, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    What is the "supported" cpanel way of removing these headers ?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    There's no supported method, however there is a workaround referenced in my previous response.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. brsnik

    brsnik Registered

    Joined:
    Jul 16, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    MKD
    cPanel Access Level:
    Root Administrator
    When the server gets restarted, settings are overwritten. Headers are shown again...

    What is a way to change it without it getting overwritten??
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Could you let us know the specific steps you took, and what in-particular was overwritten?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. motanica

    motanica Registered

    Joined:
    May 3, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Root Administrator
    Hello,

    The correct way to do this, is I guess, editing the perl script that generate headers. (don't forget to make a backup of this file before editing)

    Code:
    nano /etc/exim.pl.local
    Then, you carefully should be able to search (ctrl+w) and modify all variables containing : "X-AntiAbuse"

    After restarting that config may not be overwritten.
     
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