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!

headers_remove exim.conf

Discussion in 'E-mail Discussion' started by joaosavioli, May 27, 2019.

  1. joaosavioli

    joaosavioli Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    64
    Likes Received:
    11
    Trophy Points:
    58
    Hi,

    I´m trying to use "headers_remove = received" bellow remote_smtp: in exim.conf, but my lines are excluded after cpanel update.
    Please, how could I write these line bellow remote_smtp?
    remote:smtp:
    headers_remove = received

    I've tried to use exim advanced editor, but I didn´t know how could I add these lines bellow "remote_smtp:".

    Thank you!
    Joao
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,528
    Likes Received:
    2,180
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello Joao,

    Can you share some more information about the intent of this customization? We may be able to offer an alternative solution using a supported method of customizing Exim (E.g. using Exim Configuration Manager >> Advanced Editor).

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. joaosavioli

    joaosavioli Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    64
    Likes Received:
    11
    Trophy Points:
    58
    Hi,

    Thank you for replying!
    The original content is:
    remote_smtp:
    driver = smtp
    interface = <; ${if > {${extract{size}{${stat:/etc/mailips}}}}{0}{${lookup{${lc:${perl{get_message_sender_domain}}}}lsearch{/etc/mailips}{$value}{${lookup{${lc:$original_domain}}lsearch{/etc/mailips}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailips}{$value}{}}}}}}}}
    helo_data = ${if > {${extract{size}{${stat:/etc/mailhelo}}}}{0}{${lookup{${lc:${perl{get_message_sender_domain}}}}lsearch{/etc/mailhelo}{$value}{${lookup{${lc:$original_domain}}lsearch{/etc/mailhelo}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}}}}}{$primary_hostname}}
    hosts_try_chunking = XX.XX.XX.XX

    I'd like to change for:
    remote_smtp:
    driver = smtp
    interface = <; ${if > {${extract{size}{${stat:/etc/mailips}}}}{0}{${lookup{${lc:${perl{get_message_sender_domain}}}}lsearch{/etc/mailips}{$value}{${lookup{${lc:$original_domain}}lsearch{/etc/mailips}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailips}{$value}{}}}}}}}}
    helo_data = ${if > {${extract{size}{${stat:/etc/mailhelo}}}}{0}{${lookup{${lc:${perl{get_message_sender_domain}}}}lsearch{/etc/mailhelo}{$value}{${lookup{${lc:$original_domain}}lsearch{/etc/mailhelo}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}}}}}{$primary_hostname}}
    headers_remove = received
    hosts_try_chunking = XX.XX.XX.XX


    Thank you!
    Joao
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,528
    Likes Received:
    2,180
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello Joao,

    Can you share the intent behind adding this value? For instance, what issue are you attempting to address by making this customization?

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

    joaosavioli Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    64
    Likes Received:
    11
    Trophy Points:
    58
    Hi @cPanelMichael, thank you for replying.

    In the past, I had my primary domain blocked in spamhaus, and all ip that use any subdomain of the primary domain had listed is spamhaus database. When exim send email with headers, it show the local hostname.

    I've fixed the problem in spamhaus, and now I'm free from database, and my intent is prevent the same problem in the future.

    Cheers,
    Joao
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,528
    Likes Received:
    2,180
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello Joao,

    Thank you for the additional information. It's not possible to make this particular change to the Exim configuration using WHM >> Exim Configuration Manager >> Advanced Editor.

    As a workaround, you can first browse to the Backup tab in WHM » Service Configuration » Exim Configuration Manager to create a backup of your current Exim configuration settings. You'd then need to create a custom bash script that automatically replaces the entry in /etc/exim.conf with your preferred changes. Once the custom bash script is developed, you could make use of a Standardized Hook to execute the bash script after every cPanel update:

    Tutorial - How to Setup Standardized Hooks with BASH in cPanel & WHM

    If you require help from a third-party system administrator, we provide a list of companies offering system administration services on the link below:

    System Administration Services | cPanel Forums

    Note that it's possible modifying a message's header violates RFC guidelines, so that's something you should research before implementing this workaround.

    Additionally, I recommend opening a feature request if you'd like to see support for the ability to edit this Exim configuration value directly from WHM >> Exim Configuration Manager >> Advanced Editor.

    Thank you.
     
    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