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!

Security annoyance: Hide Exim version

Discussion in 'E-mail Discussion' started by sv70, May 27, 2009.

  1. sv70

    sv70 Active Member

    Joined:
    Dec 24, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    151
    How can we hide the Exim version?

    --------------

    #220-server.host.com ESMTP Exim 4.69 #1

    ---------------
     
  2. chinmay

    chinmay Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    localhost
    To hide the SMTP version/banner follow the steps below

    Open the file /etc/exim.conf and find for smtp_banner.

    The line would look like

    Remove the "Exim ${version_number}" from the line. The modified line would look like

    You are done !
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sv70

    sv70 Active Member

    Joined:
    Dec 24, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    151
    it works. Thanks! :)
     
  4. chinmay

    chinmay Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    localhost
    You are Welcome :) Good Luck !
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    These changes will be obliterated during the next cPanel/WHM update if not sooner if you do not take action to preserve the file (e.g. /scripts/preupcp and /scripts/postupcp scripts).
     
  6. sv70

    sv70 Active Member

    Joined:
    Dec 24, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    151
    not enough with: chattr +i /etc/exim.conf?

    How you apply /scripts/preupcp and /scripts/postupcp?
     
  7. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Correct.


    Just copy the file to a backup location in /scripts/preupcp and restore the file from a backup location in /scripts/postupcp.

    Keep in mind, by doing these manual modifications and circumventing correction mechanisms by cPanel/WHM, there is no guarantee your exim configuration will remain compatible with future versions of Exim or cPanel/WHM. You do this at your own risk.
     
  8. sv70

    sv70 Active Member

    Joined:
    Dec 24, 2006
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    151
    ok, thanks so much :)
     
  9. Bigwebmaster

    Bigwebmaster Active Member

    Joined:
    Dec 3, 2003
    Messages:
    31
    Likes Received:
    9
    Trophy Points:
    158
    I know this thread is a bit old but this is mainly for reference for anybody else looking for a solution to get around CPanel overriding the changes to the smtp_banner, I just wanted to add what might be a better solution. Instead of copying exim.conf before the update and restoring after the update (which could cause you to miss important changes CPanel makes to exim.conf), I only added to /scripts/postupcp with the following:

    Code:
    #!/bin/sh
    perl -p -i -e 's/smtp_banner = "\${primary_hostname} ESMTP Exim \${version_number}/smtp_banner = "\${primary_hostname} ESMTP Exim/g' /etc/exim.conf
    perl -p -i -e 's/\\#\${compile_number} //g' /etc/exim.conf
    So all that does is replace the smpt_banner with the same text except without the version number or compile number after upcp has been run. Unless I am forgetting something I think this should keep the smtp_banner up to date without missing important changes.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #9 Bigwebmaster, Nov 9, 2010
    Last edited: Nov 9, 2010
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